diff options
| author | Freya Murphy <freya@freyacat.org> | 2026-05-26 09:34:23 -0400 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2026-05-26 09:34:23 -0400 |
| commit | 17cf2654a2fbd5908c049748a32ba61e1455757e (patch) | |
| tree | 56b99e2b5e8a71e7a4f12c2f9f64b67cc36047d9 /system/amdgpu.nix | |
| parent | nicify system (diff) | |
| download | dotfiles-nix-17cf2654a2fbd5908c049748a32ba61e1455757e.tar.gz dotfiles-nix-17cf2654a2fbd5908c049748a32ba61e1455757e.tar.bz2 dotfiles-nix-17cf2654a2fbd5908c049748a32ba61e1455757e.zip | |
add amd anti lag
Diffstat (limited to 'system/amdgpu.nix')
| -rw-r--r-- | system/amdgpu.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/system/amdgpu.nix b/system/amdgpu.nix new file mode 100644 index 0000000..de58a62 --- /dev/null +++ b/system/amdgpu.nix @@ -0,0 +1,28 @@ +{ + 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 + environment.systemPackages = [ pkgs.low-latency-layer ]; + environment.etc."vulkan/implicit_layer.d/low_latency_layer.json".source = "${pkgs.low-latency-layer}/share/vulkan/implicit_layer.d/low_latency_layer.json"; + + # Configuration + environment.variables = { + AMD_VULKAN_ICD = "RADV"; + RADV_ANTILAG = "1"; + LOW_LATENCY_LAYER = "1"; + }; + }; +} |