17 lines
326 B
Nix
17 lines
326 B
Nix
{ 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";
|
|
};
|
|
};
|
|
}
|