Auto-optimise Nix store

This commit is contained in:
coolneng 2021-01-01 16:52:31 +01:00
parent 414da75426
commit e24cb663eb
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 3 additions and 1 deletions

View File

@ -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
'';
};