From e24cb663eb657fa02226a50a8861926af92533ef Mon Sep 17 00:00:00 2001 From: coolneng Date: Fri, 1 Jan 2021 16:52:31 +0100 Subject: [PATCH] Auto-optimise Nix store --- configuration.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index 93f3eb0..cdf032e 100644 --- a/configuration.nix +++ b/configuration.nix @@ -68,14 +68,16 @@ allowReboot = true; }; - # Run Nix garbage collector + # Run Nix garbage collector, while avoiding recompilation nix = { + autoOptimiseStore = true; gc = { automatic = true; options = "--delete-older-than 14d"; }; extraOptions = '' keep-outputs = true + keep-derivations = true gc-keep-outputs = true ''; };