feat(nixos): Enable nh garbage collection

This commit is contained in:
punkfairie 2025-01-13 18:58:20 -08:00
parent a0794330ca
commit bfca6f8735
No known key found for this signature in database
GPG key ID: B3C5488E9A1A7CA6
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,20 @@
{
config,
lib,
...
}: let
cfg = config.marleyos.programs.nh;
in {
options.marleyos.programs.nh.enable = lib.mkEnableOption "nh";
config = lib.mkIf cfg.enable {
programs.nh = {
enable = true;
clean = {
enable = true;
dates = "daily";
extraArgs = "--keep-since 7d --keep 3";
};
};
};
}

View file

@ -20,6 +20,7 @@ in {
programs = {
fish = enabled;
nh = enabled;
};
services = {