diff --git a/configs/container_config.nix b/configs/container_config.nix index 48ff9c4..9cbdb1d 100644 --- a/configs/container_config.nix +++ b/configs/container_config.nix @@ -96,6 +96,15 @@ }; }; + # garbage collection & optimization + nix.optimise.automatic = true; + nix.optimise.dates = [ "03:45" ]; # Optional; allows customizing optimisation schedule + + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions