move garbage collect logic to nix module

This commit is contained in:
2025-06-30 23:05:43 +02:00
parent 581a63a196
commit eda9b91af4
2 changed files with 10 additions and 24 deletions

View File

@ -164,12 +164,20 @@
nix = {
settings.experimental-features = ["nix-command" "flakes"]; # Enable modern Nix features (flakes and new CLI)
# Optimise the Nix store automatically to recover space
optimise = {
# Optimise the Nix store automatically to recover space
automatic = true;
dates = ["03:45"]; # Optional; allows customizing optimisation schedule
dates = ["03:45"];
persistent = true; # Run missed optimisations
};
# Garbage collect the Nix store automatically to recover space
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 60d";
persistent = true; # Run missed GC
};
};
# ================================