From 07e1ef72e811cdfa2697e802805b30e0e1bf36ef Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 7 Apr 2024 22:10:37 -0400 Subject: [PATCH] nix: optimize store on schedule rather than with each build --- nixosModules/systemConfig/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixosModules/systemConfig/default.nix b/nixosModules/systemConfig/default.nix index 8508cf3e..a157cbfb 100644 --- a/nixosModules/systemConfig/default.nix +++ b/nixosModules/systemConfig/default.nix @@ -84,6 +84,8 @@ }; nix = { + # Optimize the Nix store on a schedule. + optimise.automatic = true; gc = { # Delete generations older than 7 days. automatic = true; @@ -97,8 +99,8 @@ max-free = ${toString (1024 * 1024 * 1024)} ''; settings = { - # Automatically optimize the Nix store in the background. - auto-optimise-store = true; + # Automatically optimize the Nix store during every build. + auto-optimise-store = false; # Enable experimental `nix` command and flakes. experimental-features = [ "nix-command" "flakes" ]; substituters = [