2023-09-19 00:17:43 +00:00
|
|
|
{ ... }:
|
|
|
|
|
|
|
|
# Nvidia Prime ( multi gpu on laptop )
|
|
|
|
{
|
|
|
|
hardware.nvidia.prime = {
|
|
|
|
sync.enable = false;
|
2023-10-07 08:19:15 +00:00
|
|
|
|
|
|
|
### Device specific, please put those configuration in `machines/your-machine.nix`
|
|
|
|
# nvidiaBusId = "PCI:1:0:0";
|
|
|
|
# intelBusId = "PCI:0:2:0";
|
2023-09-19 00:17:43 +00:00
|
|
|
offload = {
|
|
|
|
enable = true;
|
|
|
|
enableOffloadCmd = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
environment.sessionVariables = {
|
|
|
|
"GAMEMODERUNEXEC" = "env __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only"; # gamemode: nvidia offload
|
|
|
|
};
|
|
|
|
}
|