all repos — nixfiles @ 39129c6bee655a381116d34c4feccdbaf7f8a25b

System and user configuration, managed by nix and home-manager

Improve NVidia configuration
Alan Pearce alan@alanpearce.eu
Sun, 14 Apr 2024 15:45:49 +0200
commit

39129c6bee655a381116d34c4feccdbaf7f8a25b

parent

872e172bfc99fb106424e5337718cda0bfacccec

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M system/settings/hardware/nvidia-gpu.nixsystem/settings/hardware/nvidia-gpu.nix
@@ -5,12 +5,15 @@ , ... }:
 {
   services.xserver.videoDrivers = [ "nvidia" ];
+  boot.initrd.kernelModules = [ "nvidia" ];
+  boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
 
   hardware.nvidia = {
     modesetting.enable = true;
     powerManagement = {
       enable = true;
     };
+    package = config.boot.kernelPackages.nvidiaPackages.stable;
   };
 
   nixpkgs.config.allowUnfree = true;
@@ -19,4 +22,5 @@ enable = lib.mkDefault true;   };
 
   services.displayManager.sddm.wayland.enable = false;
+  services.displayManager.defaultSession = "plasmax11";
 }