summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
authorAlan Pearce2020-04-22 13:35:35 +0200
committerAlan Pearce2020-04-22 13:35:35 +0200
commitc16f93fb5191de796835b3c1b5ae810ecf93a414 (patch)
tree364fceec3ca0ffcafea3ba4f46124dea6c2d75e7 /system
parent3c2fabc14bd57d4e7d7ee62c560c74b25ed8b1d2 (diff)
downloadnixfiles-c16f93fb5191de796835b3c1b5ae810ecf93a414.tar.lz
nixfiles-c16f93fb5191de796835b3c1b5ae810ecf93a414.tar.zst
nixfiles-c16f93fb5191de796835b3c1b5ae810ecf93a414.zip
nvidia-gpu: ensure nouveau module is not loaded
Diffstat (limited to 'system')
-rw-r--r--system/settings/hardware/nvidia-gpu.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/system/settings/hardware/nvidia-gpu.nix b/system/settings/hardware/nvidia-gpu.nix
index 0f99e73c..c6662659 100644
--- a/system/settings/hardware/nvidia-gpu.nix
+++ b/system/settings/hardware/nvidia-gpu.nix
@@ -1,6 +1,15 @@
 { config, pkgs, ... }:
 
-{ services.xserver.videoDrivers = [ "nvidia" ];
+let
+  nvidia_x11 = config.boot.kernelPackages.nvidia_x11;
+in { services.xserver.videoDrivers = [ "nvidia" ];
+  boot = {
+    blacklistedKernelModules = [ "nouveau" ];
+    extraModulePackages = [ nvidia_x11 ];
+  };
+
+  environment.systemPackages = [ nvidia_x11 ];
+
   nixpkgs.config.allowUnfree = true;
   services.compton = {
     enable = true;