Skip to content

Commit

Permalink
common/nvidia disable: Remove lib.mkDefault
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyndeno authored and Mic92 committed Aug 9, 2023
1 parent 5426a95 commit 1b3c128
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions common/gpu/nvidia/disable.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{ lib, ... }:
{ ... }:

{
# This runs only intel/amdgpu igpus and nvidia dgpus do not drain power.

##### disable nvidia, very nice battery life.
boot.extraModprobeConfig = lib.mkDefault ''
boot.extraModprobeConfig = ''
blacklist nouveau
options nouveau modeset=0
'';

services.udev.extraRules = lib.mkDefault ''
services.udev.extraRules = ''
# Remove NVIDIA USB xHCI Host Controller devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
Expand All @@ -22,5 +22,5 @@
# Remove NVIDIA VGA/3D controller devices
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
'';
boot.blacklistedKernelModules = lib.mkDefault [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];
boot.blacklistedKernelModules = [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];
}

0 comments on commit 1b3c128

Please sign in to comment.