From 7f814ad575e6bd98a8284f54738a5f0054fbbbb8 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Fri, 4 Oct 2024 17:28:57 +0200 Subject: [PATCH] don't hog all cores, might OOM, too --- share/common.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/share/common.nix b/share/common.nix index abfbff3..dda705f 100644 --- a/share/common.nix +++ b/share/common.nix @@ -257,11 +257,18 @@ in # package manager config nix = { - # don't hog all cores, might OOM, too - settings.max-jobs = 4; + # general settings + settings = { + # don't hog all cores, might OOM, too + cores = 2; + max-jobs = 2; - # auto optimize the store - settings.auto-optimise-store = true; + # auto optimize the store + auto-optimise-store = true; + + # enable new stuff + experimental-features = "nix-command flakes"; + }; # cleanup the store from time to time gc = { @@ -270,9 +277,6 @@ in options = "--delete-older-than 7d"; }; - # enable new stuff - settings.experimental-features = "nix-command flakes"; - # https://github.com/nix-community/nix-direnv extraOptions = '' keep-outputs = true