diff options
Diffstat (limited to 'modules/nix.nix')
| -rw-r--r-- | modules/nix.nix | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/modules/nix.nix b/modules/nix.nix index de1281a..64fc4a3 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -24,12 +24,18 @@ # "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" # ]; }; - gc = { - automatic = true; + optimise.automatic = true; + }; + + # nh's cleaner replaces nix.gc (the nh module asserts they aren't both on) + programs.nh = { + enable = true; + clean = { + enable = true; dates = "weekly"; - options = "--delete-older-than +7"; + # --no-direnv keeps nix-direnv's gcroots so dev shells survive + extraArgs = "--keep-since 7d --keep 5 --no-direnv"; }; - optimise.automatic = true; }; }; } |
