From 7a79e4234c5602832dc1ed922e686a6bcb2bde85 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Thu, 23 May 2024 11:02:22 +0200 Subject: [PATCH] [Nix] use CGroups and always allow substitutes We are almost always better downloading everything considering our network speed. --- nix/nix.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nix/nix.nix b/nix/nix.nix index 778f85b..98d02fa 100644 --- a/nix/nix.nix +++ b/nix/nix.nix @@ -112,6 +112,9 @@ in ++ optional cfg.contentAddressed "cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=" ); + nix.settings.use-cgroups = true; + nix.settings.always-allow-substitutes = true; + nix.settings.cores = mkIf (generalCfg.cpu.threads != null) generalCfg.cpu.threads; nix.settings.max-jobs = mkIf (generalCfg.cpu.threads != null) (math.log2 generalCfg.cpu.threads);