summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2026-05-26 09:34:23 -0400
committerFreya Murphy <freya@freyacat.org>2026-05-26 09:34:23 -0400
commit17cf2654a2fbd5908c049748a32ba61e1455757e (patch)
tree56b99e2b5e8a71e7a4f12c2f9f64b67cc36047d9 /system
parentnicify system (diff)
downloaddotfiles-nix-17cf2654a2fbd5908c049748a32ba61e1455757e.tar.gz
dotfiles-nix-17cf2654a2fbd5908c049748a32ba61e1455757e.tar.bz2
dotfiles-nix-17cf2654a2fbd5908c049748a32ba61e1455757e.zip
add amd anti lag
Diffstat (limited to 'system')
-rw-r--r--system/amdgpu.nix28
-rw-r--r--system/default.nix1
2 files changed, 29 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";
+ };
+ };
+}
diff --git a/system/default.nix b/system/default.nix
index 40ef029..39d41bc 100644
--- a/system/default.nix
+++ b/system/default.nix
@@ -16,6 +16,7 @@ in {
./desktops
./gaming
./virt
+ ./amdgpu.nix
./battery.nix
./bluetooth.nix
./desktop.nix