1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-10 04:59:40 +01:00
nixos-hardware/lenovo/legion/16ach6h/nvidia/default.nix
2024-06-13 09:51:03 +03:00

17 lines
823 B
Nix

{ ... }:
{
imports = [ ../hybrid ];
services.xserver.videoDrivers = [ "nvidia" ]; # This will override services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" "nvidia" ];
# 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
# of nix cannot implement such an operation as canceling an import.
hardware = {
nvidia.prime.offload.enable = false;
amdgpu.opencl = false;
};
}