From 028dc4a01733f9260b95a7f16076e88cf19d606a Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Tue, 8 Oct 2024 14:15:07 +0200 Subject: [PATCH] refactor(Zepyrus): Moved NVIDIA config to `hardware-configuration.nix` --- hosts/Zephyrus/default.nix | 27 ----------------------- hosts/Zephyrus/hardware-configuration.nix | 20 +++++++++++++++++ 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/hosts/Zephyrus/default.nix b/hosts/Zephyrus/default.nix index 0edb754..bf8aca1 100644 --- a/hosts/Zephyrus/default.nix +++ b/hosts/Zephyrus/default.nix @@ -52,33 +52,6 @@ podman-compose ]; - # NVIDIA - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - # NVIDIA - "nvidia-x11" - "nvidia-settings" - # Steam - "steam" - "steam-original" - "steam-run" - ]; - - hardware.graphics.enable = true; - - services.xserver.videoDrivers = ["nvidia"]; - - hardware.nvidia = { - modesetting.enable = true; - - open = false; # Bruuh - - prime = { - amdgpuBusId = "PCI:7:0:0"; - nvidiaBusId = "PCI:1:0:0"; - }; - }; - #Podman virtualisation.containers.enable = true; virtualisation = { diff --git a/hosts/Zephyrus/hardware-configuration.nix b/hosts/Zephyrus/hardware-configuration.nix index 7ea0966..32080b7 100644 --- a/hosts/Zephyrus/hardware-configuration.nix +++ b/hosts/Zephyrus/hardware-configuration.nix @@ -32,6 +32,26 @@ tmp.useTmpfs = true; }; + #NVIDIA + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "nvidia-x11" + "nvidia-settings" + ]; + + hardware.graphics.enable = true; + hardware.nvidia = { + modesetting.enable = true; + + open = false; # Bruuh + + prime = { + amdgpuBusId = "PCI:7:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + services.xserver.videoDrivers = ["nvidia"]; + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction