oignon: nftables: open 8776 for radicle-node
[julm/julm-nix.git] / nixos / profiles / builder.nix
index 79622c0d88133aa0212bc014f93fd6f8cec0455b..5b3ecd01fbcfa3ff16c16d8a837e12a09bee87c0 100644 (file)
@@ -1,21 +1,28 @@
-{ inputs, pkgs, lib, config, ... }:
+{ lib, inputs, ... }:
 {
-nix.extraOptions = ''
-  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";
-    rev = inputs.nixpkgs.rev;
-    type = "github";
+  nix.settings.experimental-features = [ "nix-command" "flakes" "repl-flake" ];
+  #nix.registry.self.flake = inputs.self;
+  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;
   };
-};
-nix.nixPath = [
-  "nixpkgs=${inputs.nixpkgs}"
-];
+
+  systemd.services.nix-gc.serviceConfig = {
+    CPUSchedulingPolicy = "batch";
+    IOSchedulingClass = "best-effort";
+    IOSchedulingPriority = 7;
+    Nice = 5;
+  };
+
+  systemd.sleep.extraConfig = ''
+    AllowSuspend=no
+    AllowHibernation=no
+  '';
 }