From ccc924e2512897ea9dc214f5d5f15322ff16a2ed Mon Sep 17 00:00:00 2001 From: moons-14 Date: Sun, 21 Jun 2026 00:40:39 +0900 Subject: [PATCH] gc --- modules/applications/nh.nix | 6 ++++++ modules/system/gc.nix | 14 +++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) 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" ]; + }; }