diff --git a/hosts/solaire/config/nvidia.nix b/hosts/solaire/config/nvidia.nix deleted file mode 100644 index 00bc09d..0000000 --- a/hosts/solaire/config/nvidia.nix +++ /dev/null @@ -1,14 +0,0 @@ -{config, ...}: { - hardware.graphics.enable = true; - services.xserver.videoDrivers = ["nvidia"]; - hardware.nvidia = { - open = false; - modesetting.enable = true; - powerManagement.enable = true; - nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.beta; - }; - - # https://wiki.hyprland.org/Nvidia/#suspendwakeup-issues - boot.kernelParams = ["nvidia.NVreg_PreserveVideoMemoryAllocations=1"]; -} diff --git a/hosts/solaire/default.nix b/hosts/solaire/default.nix index a3f60af..08fde68 100644 --- a/hosts/solaire/default.nix +++ b/hosts/solaire/default.nix @@ -1,5 +1,5 @@ _: { - imports = [./hardware-configuration.nix ./config/theme.nix ./config/nvidia.nix]; + imports = [./hardware-configuration.nix ./config/theme.nix]; local = { systemVars = { @@ -9,6 +9,7 @@ _: { homeVars = { fullName = "Anthony Rodriguez"; email = "anthony@nezia.dev"; + signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEzs7SQH0Vjt9JHoXXmWy9fPU1I3rrRWV5magZFrI5al nezia@solaire"; }; profiles = { @@ -18,6 +19,7 @@ _: { modules = { hyprland.enable = true; + nvidia.enable = true; }; }; diff --git a/modules/core/hardware/default.nix b/modules/core/hardware/default.nix index 660a10f..502a8e2 100644 --- a/modules/core/hardware/default.nix +++ b/modules/core/hardware/default.nix @@ -2,6 +2,7 @@ imports = [ ./fprintd.nix ./fwupd.nix + ./nvidia.nix ./printing.nix ./uni-sync.nix ./via.nix diff --git a/modules/core/hardware/nvidia.nix b/modules/core/hardware/nvidia.nix new file mode 100644 index 0000000..abd3cf0 --- /dev/null +++ b/modules/core/hardware/nvidia.nix @@ -0,0 +1,22 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf; +in { + config = mkIf config.local.modules.nvidia.enable { + hardware.graphics.enable = true; + services.xserver.videoDrivers = ["nvidia"]; + hardware.nvidia = { + open = false; + modesetting.enable = true; + powerManagement.enable = true; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.beta; + }; + + # https://wiki.hyprland.org/Nvidia/#suspendwakeup-issues + boot.kernelParams = ["nvidia.NVreg_PreserveVideoMemoryAllocations=1"]; + }; +}