diff --git a/hosts/common.nix b/hosts/common.nix index 169e82d1..2a768517 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -2,15 +2,20 @@ let flakeURL = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main"; in { nix = { - settings.experimental-features = [ "nix-command" "flakes" ]; + settings = { + experimental-features = [ "nix-command" "flakes" ]; + auto-optimise-store = true; + }; gc = { automatic = true; - dates = "daily"; - options = "--delete-older-than 7d"; + dates = "weekly"; + options = "--delete-older-than 30d"; }; extraOptions = '' keep-outputs = true keep-derivations = true + min-free = ${toString (100 * 1024 * 1024)} + max-free = ${toString (1024 * 1024 * 1024)} ''; }; system.autoUpgrade.flake = flakeURL;