feat(gc): init
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
filesystemType = "btrfs";
|
||||
|
||||
stylix.enable = true;
|
||||
gc.enable = true;
|
||||
openssh.enable = true;
|
||||
sydpkgs.overlay.enable = true;
|
||||
|
||||
|
||||
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