diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index c1fe84a..41d3d37 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -14,9 +14,15 @@ lib.mkIf config.targets.genericLinux.enable { package = pkgs.nix; - settings.experimental-features = ["nix-command" "flakes"]; - settings.max-jobs = "auto"; - gc.automatic = true; + settings = { + experimental-features = ["nix-command" "flakes"]; + max-jobs = "auto"; + }; + gc = { + automatic = true; + frequency = "weekly"; + options = "--delete-older-than 30d"; + }; }; imports = [ ../hostopts.nix diff --git a/modules/nixos/common.nix b/modules/nixos/common.nix index bc5077b..80fd949 100644 --- a/modules/nixos/common.nix +++ b/modules/nixos/common.nix @@ -13,6 +13,15 @@ extraOptions = '' experimental-features = nix-command flakes ''; + optimise.automatic = true; + settings = { + auto-optimise-store = true; + }; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; }; # Allow unfree packages