Rename module gc to auto-gc

This commit is contained in:
SebastianStork 2026-01-23 21:32:41 +01:00
parent 8de1770dba
commit 8e949b0361
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
6 changed files with 7 additions and 7 deletions

View file

@ -0,0 +1,27 @@
{ config, lib, ... }:
let
cfg = config.custom.services.auto-gc;
in
{
options.custom.services.auto-gc = {
enable = lib.mkEnableOption "";
onlyCleanRoots = lib.mkEnableOption "";
};
config = lib.mkIf cfg.enable {
programs.nh = {
enable = true;
clean = {
enable = true;
dates = "weekly";
extraArgs =
[
"--keep 10"
"--keep-since 7d"
(lib.optionalString cfg.onlyCleanRoots "--no-gc")
]
|> lib.concatStringsSep " ";
};
};
};
}