bash: networkctl requires root
[julm/julm-nix.git] / nixos / profiles / server.nix
index ed3bf641075d35f00d1215490b576d8381538e49..4af2c34c908d60073164088dc1e39549493560e4 100644 (file)
@@ -1,6 +1,23 @@
+{ lib, ... }:
 {
+  systemd.services.nix-daemon.serviceConfig = {
+    CPUSchedulingPolicy = lib.mkForce "batch";
+    IOSchedulingClass = lib.mkForce "best-effort";
+    # 0: high priority, 7: low priority
+    IOSchedulingPriority = lib.mkForce 4;
+    Nice = 0;
+  };
+
+  systemd.services.nix-gc.serviceConfig = {
+    CPUSchedulingPolicy = "idle";
+    IOSchedulingClass = "idle";
+    IOSchedulingPriority = 7;
+    Nice = 19;
+  };
+
   systemd.sleep.extraConfig = ''
     AllowSuspend=no
     AllowHibernation=no
   '';
+
 }