From 45d660deb5117db00b9918e2c0201b1874d0cc99 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Mon, 20 May 2024 17:39:23 +0200 Subject: [PATCH] feat: enable jobserver and cores = 0; Signed-off-by: Raito Bezarius --- modules/nix-daemon.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/nix-daemon.nix b/modules/nix-daemon.nix index 9ebbe82..b30d12d 100644 --- a/modules/nix-daemon.nix +++ b/modules/nix-daemon.nix @@ -30,6 +30,9 @@ in { domain = "*"; item = "nofile"; type = "-"; value = "20480"; } ]; + # Makes the computer go faster. + nixos.jobserver.enable = true; + # Memory accounting techniques systemd.services.nix-daemon.serviceConfig = { MemoryAccounting = true; @@ -63,7 +66,7 @@ in use-cgroups = true; http-connections = 0; auto-allocate-uids = true; - cores = 64; # 128 is too much, it will explode the RAM for now. Let's keep it serious. + cores = 0; max-jobs = 2; # Do not build more than 2 derivations at once in the event, both of them are too big, yes this is stupid, fix it in Nix. fsync-metadata = true; substituters = [