diff --git a/modules/applications/nh.nix b/modules/applications/nh.nix index 8feba6d..b5e9cb0 100644 --- a/modules/applications/nh.nix +++ b/modules/applications/nh.nix @@ -16,6 +16,12 @@ in programs.nh = { enable = true; flake = "/home/${username}/dotfiles"; + + clean = { + enable = true; + dates = "weekly"; + extraArgs = "--keep-since 14d --keep 10"; + }; }; }; } diff --git a/modules/system/gc.nix b/modules/system/gc.nix index 31312b7..60d7e24 100644 --- a/modules/system/gc.nix +++ b/modules/system/gc.nix @@ -1,10 +1,10 @@ _: { - nix.gc = { - automatic = true; - dates = "daily"; - options = "--delete-older-than 7d"; - }; + nix.gc.automatic = false; - nix.settings.auto-optimise-store = true; - nix.optimise.automatic = true; + nix.settings.auto-optimise-store = false; + + nix.optimise = { + automatic = true; + dates = [ "weekly" ]; + }; }