2024-12-02 03:57:34 -07:00
|
|
|
{ ... }:
|
|
|
|
{
|
|
|
|
hardware.graphics.enable = true;
|
2024-12-11 00:59:49 -07:00
|
|
|
services.xserver.videoDrivers = ["amdgpu" "nvidia"];
|
2024-12-02 19:35:25 -07:00
|
|
|
# services.xserver.videoDrivers = ["nvidia" "amdgpu"];
|
2024-12-11 00:59:49 -07:00
|
|
|
hardware.nvidia = {
|
|
|
|
modesetting.enable = true;
|
2024-12-02 03:57:34 -07:00
|
|
|
|
2024-12-11 00:59:49 -07:00
|
|
|
# Experimental nvidia power management
|
|
|
|
powerManagement.enable = false;
|
2024-12-02 03:57:34 -07:00
|
|
|
|
2024-12-11 00:59:49 -07:00
|
|
|
# Experimentally turn off Nvidia GPU when not in use
|
|
|
|
powerManagement.finegrained = false;
|
2024-12-02 03:57:34 -07:00
|
|
|
|
2024-12-21 11:15:14 -07:00
|
|
|
open = true; # Open source module is still very much beta
|
2024-12-02 03:57:34 -07:00
|
|
|
|
2024-12-11 00:59:49 -07:00
|
|
|
nvidiaSettings = true;
|
2024-12-02 03:57:34 -07:00
|
|
|
|
2024-12-11 00:59:49 -07:00
|
|
|
# Configure dual-gpu offloading
|
|
|
|
prime = {
|
|
|
|
amdgpuBusId = "PCI:4:0:0";
|
|
|
|
nvidiaBusId = "PCI:1:0:0";
|
2024-12-02 03:57:34 -07:00
|
|
|
|
2024-12-11 00:59:49 -07:00
|
|
|
offload = {
|
|
|
|
enable = true;
|
|
|
|
enableOffloadCmd = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-12-02 03:57:34 -07:00
|
|
|
}
|