mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 22:29:06 +01:00
Rename module gc to auto-gc
This commit is contained in:
parent
8de1770dba
commit
8e949b0361
6 changed files with 7 additions and 7 deletions
27
modules/system/services/auto-gc.nix
Normal file
27
modules/system/services/auto-gc.nix
Normal 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 " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue