2022-12-19 14:55:29 +00:00
|
|
|
{ ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports = [ ../hybrid ];
|
|
|
|
services.xserver.videoDrivers = [ "nvidia" ]; # This will override services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" "nvidia" ];
|
2023-02-09 09:04:15 +00:00
|
|
|
# When I play the game through proton, I found that in the case of Dual-Direct GFX
|
|
|
|
# enabled (dGPU disabled), proton will crash directly. But in the case of hybrid,
|
|
|
|
# the game runs fine with or without nvidia-offload After investigation, this is
|
|
|
|
# because when writing the specialization of Dual-Direct GFX, I did not completely
|
|
|
|
# remove all packages for amd igpu. I only removed amdgpu from
|
|
|
|
# services.xserver.videoDrivers by overriding. This is because the specialization
|
2024-06-13 06:51:03 +00:00
|
|
|
# of nix cannot implement such an operation as canceling an import.
|
2023-01-28 15:49:25 +00:00
|
|
|
hardware = {
|
|
|
|
nvidia.prime.offload.enable = false;
|
2024-06-13 06:51:03 +00:00
|
|
|
amdgpu.opencl = false;
|
2023-01-28 15:49:25 +00:00
|
|
|
};
|
2024-06-13 06:51:03 +00:00
|
|
|
}
|