diff --git a/modules/base.nix b/modules/base.nix index 8f9f6df..61d8f7c 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -83,7 +83,12 @@ nix.gc = { automatic = true; dates = "weekly"; - options = "--delete-older-than 7d"; + # Options given to nix-collect-garbage. + # They are documented here: https://nixos.org/manual/nix/stable/command-ref/nix-collect-garbage + # The `--delete-older-than `: https://nixos.org/manual/nix/stable/command-ref/nix-env/delete-generations#generations-time + # There, two meanings of are described. The second one is: + # +: Keep the last number generations, along with any newer than current. + options = "--delete-older-than +7"; }; # Delete all files in /tmp during boot.