about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSilas Schöffel <sils@sils.li>2026-01-16 20:18:08 +0100
committerSilas Schöffel <sils@sils.li>2026-01-17 00:47:12 +0100
commitdbdf2047ddfd3255c06eea4ad05176a72832a629 (patch)
tree2426a7b7514aa4820d92183bd79fe7e2c0e787ad
parentflake: switch to nixpkgs-25.11 (diff)
downloadnix-config-dbdf2047ddfd3255c06eea4ad05176a72832a629.zip
sys/users: add realtime group
Diffstat (limited to '')
-rw-r--r--sys/users/default.nix31
1 files changed, 30 insertions, 1 deletions
diff --git a/sys/users/default.nix b/sys/users/default.nix
index a6f8877..b1ff018 100644
--- a/sys/users/default.nix
+++ b/sys/users/default.nix
@@ -11,8 +11,37 @@
       home = "/home/sils";
       shell = pkgs.zsh;
       initialHashedPassword = "$y$j9T$r4578Hy9jZHmUH9uSr9OI.$SuR2anRq7EJ1gUJ6vi9qYmZrhLP.o3O5643IG6r5Ap/";
-      extraGroups = ["wheel" "networkmanager" "video" "libvirtd"];
+      extraGroups = [
+        "wheel"
+        "networkmanager"
+        "video"
+        "libvirtd"
+        "realtime"
+      ];
     };
   };
+  services.udev.extraRules = ''
+    KERNEL=="cpu_dma_latency", GROUP="realtime"
+  '';
+  security.pam.loginLimits = [
+    {
+      domain = "@realtime";
+      type = "-";
+      item = "rtprio";
+      value = 98;
+    }
+    {
+      domain = "@realtime";
+      type = "-";
+      item = "memlock";
+      value = "unlimited";
+    }
+    {
+      domain = "@realtime";
+      type = "-";
+      item = "nice";
+      value = -11;
+    }
+  ];
   programs.zsh.enable = true;
 }