feat(gc): init
This commit is contained in:
16
modules/nixos/gc.nix
Normal file
16
modules/nixos/gc.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.sydnix.gc;
|
||||
in {
|
||||
options.sydnix.gc = {
|
||||
enable = lib.mkEnableOption "the automatic Nix garbage collector";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
randomizedDelaySec = "14m";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user