avahi: disable useless nssmdns6
[julm/julm-nix.git] / nixos / profiles / builder.nix
index 457dce93f55d227b132895f84f79c608989f0838..a9b8c3dfd43e9d3f02fbf7de9162fe7fc5861a6b 100644 (file)
@@ -1,19 +1,31 @@
-{ inputs, ... }:
+{ lib, inputs, ... }:
 {
-  nix.settings.experimental-features = [ "nix-command" "flakes" ];
+  nix.settings.experimental-features = [
+    "nix-command"
+    "flakes"
+  ];
   #nix.registry.self.flake = inputs.self;
-  # Pin the rev to the revision of the public Nixpkgs that the system was built from.
-  # This is the version which will be locked by flakes using flake:nixpkgs
-  nix.registry.nixpkgs = {
-    from = { id = "nixpkgs"; type = "indirect"; };
-    to = {
-      owner = "NixOS";
-      repo = "nixpkgs";
-      inherit (inputs.nixpkgs) rev;
-      type = "github";
-    };
-  };
   nix.nixPath = [
     "nixpkgs=${inputs.nixpkgs}"
   ];
+
+  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 = "batch";
+    IOSchedulingClass = "best-effort";
+    IOSchedulingPriority = 7;
+    Nice = 5;
+  };
+
+  systemd.sleep.extraConfig = ''
+    AllowSuspend=no
+    AllowHibernation=no
+  '';
 }