convert nvidia-optimus.nix to specialisation
This commit is contained in:
parent
a22acd6a9e
commit
973a31859d
@ -3,20 +3,14 @@
|
|||||||
{
|
{
|
||||||
services.supergfxd.enable = true;
|
services.supergfxd.enable = true;
|
||||||
|
|
||||||
|
specialisation = {
|
||||||
|
nvidia.configuration = {
|
||||||
|
system.nixos.tags = [ "NVIDIA" ]
|
||||||
|
|
||||||
# Load nvidia driver for Xorg and Wayland
|
# Load nvidia driver for Xorg and Wayland
|
||||||
services.xserver.videoDrivers = ["amdgpu" "nvidia"];
|
services.xserver.videoDrivers = ["amdgpu" "nvidia"];
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
|
|
||||||
# Modesetting is required.
|
|
||||||
modesetting.enable = false;
|
|
||||||
|
|
||||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
|
||||||
powerManagement.enable = false;
|
|
||||||
# Fine-grained power management. Turns off GPU when not in use.
|
|
||||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
|
||||||
powerManagement.finegrained = false;
|
|
||||||
|
|
||||||
# Use the NVidia open source kernel module (not to be confused with the
|
# Use the NVidia open source kernel module (not to be confused with the
|
||||||
# independent third-party "nouveau" open source driver).
|
# independent third-party "nouveau" open source driver).
|
||||||
# Support is limited to the Turing and later architectures. Full list of
|
# Support is limited to the Turing and later architectures. Full list of
|
||||||
@ -41,6 +35,7 @@
|
|||||||
amdgpuBusId = "PCI:07:00:0";
|
amdgpuBusId = "PCI:07:00:0";
|
||||||
nvidiaBusId = "PCI:01:00:0";
|
nvidiaBusId = "PCI:01:00:0";
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user