diff options
Diffstat (limited to 'system/amdgpu.nix')
| -rw-r--r-- | system/amdgpu.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/system/amdgpu.nix b/system/amdgpu.nix new file mode 100644 index 0000000..5bb0f02 --- /dev/null +++ b/system/amdgpu.nix @@ -0,0 +1,29 @@ +{ + lib, + config, + pkgs, + ... +}: let + inherit (lib) mkIf; + cfg = config.amdgpu; +in { + config = mkIf cfg.enable { + # kernel modules + boot = { + initrd.kernelModules = ["amdgpu"]; + kernelModules = ["kvm-amd"]; + }; + + # AMD Anti-Lag + hardware.graphics.extraPackages = with pkgs; [ + low-latency-layer + ]; + + # Configuration + environment.variables = { + AMD_VULKAN_ICD = "RADV"; + RADV_ANTILAG = "1"; + LOW_LATENCY_LAYER = "1"; + }; + }; +} |