garbage collect more often

This commit is contained in:
Casper V. Kristensen 2023-11-12 03:03:15 +01:00
parent b0cd8a2d84
commit d5d6fa670d

View file

@ -6,11 +6,18 @@
nix = { nix = {
# https://nixos.wiki/wiki/Storage_optimization # https://nixos.wiki/wiki/Storage_optimization
gc = { gc = {
# Automatically run the nix garbage collector, removing files from
# the store that are not referenced by any generation.
# https://nixos.org/manual/nix/stable/package-management/garbage-collection
automatic = true; automatic = true;
dates = "weekly"; dates = "weekly";
options = "--delete-older-than=90d"; options = "--delete-older-than=7d";
}; };
settings = { settings = {
# Automatically optimise the store after each build. Store optimisation
# reduces nix store space by 25-35% by finding identical files and
# hard-linking them to each other.
# https://nixos.org/manual/nix/unstable/command-ref/nix-store/optimise.html
auto-optimise-store = true; auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [ "nix-command" "flakes" ];
}; };