From f29c5c4337febe2dc015d61f5c36b4c129e7f565 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 17 Oct 2026 14:59:30 +1300 Subject: feat: Lots of changes --- modules/nix.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'modules') 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; }; }; } -- cgit v1.3.1