2022-12-31 11:52:38 +01:00
|
|
|
{ lib, ... }:
|
2022-11-13 02:32:01 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
# This runs only intel/amdgpu igpus and nvidia dgpus do not drain power.
|
|
|
|
|
|
|
|
##### disable nvidia, very nice battery life.
|
2023-03-04 17:39:37 +01:00
|
|
|
boot.extraModprobeConfig = lib.mkDefault ''
|
|
|
|
blacklist nouveau
|
|
|
|
options nouveau modeset=0
|
|
|
|
'';
|
|
|
|
|
|
|
|
services.udev.extraRules = lib.mkDefault ''
|
|
|
|
# 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"
|
|
|
|
|
|
|
|
# Remove NVIDIA USB Type-C UCSI devices, if present
|
|
|
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
|
|
|
|
|
|
|
|
# Remove NVIDIA Audio devices, if present
|
|
|
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
|
|
|
|
|
|
|
# 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"
|
|
|
|
'';
|
2023-06-28 01:55:39 +02:00
|
|
|
boot.blacklistedKernelModules = lib.mkDefault [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];
|
|
|
|
}
|