feat(nixos): Enable nh garbage collection
This commit is contained in:
parent
a0794330ca
commit
bfca6f8735
2 changed files with 21 additions and 0 deletions
20
modules/nixos/programs/nh/default.nix
Normal file
20
modules/nixos/programs/nh/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -20,6 +20,7 @@ in {
|
|||
|
||||
programs = {
|
||||
fish = enabled;
|
||||
nh = enabled;
|
||||
};
|
||||
|
||||
services = {
|
||||
|
|
Loading…
Reference in a new issue