feat(gc): init

This commit is contained in:
2026-01-31 16:23:04 -07:00
parent 77a2249a71
commit 7b5a43954c
2 changed files with 17 additions and 0 deletions

View File

@@ -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
View 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";
};
};
}