This commit is contained in:
HotaruBlaze
2026-05-31 11:08:04 +00:00
parent 8e54095733
commit bfdcbd6594
2 changed files with 32 additions and 0 deletions

View File

@@ -7,5 +7,6 @@
./common/services.nix
./common/networking.nix
./common/system.nix
./common/garbage-collection.nix
];
}

View File

@@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
{
# ─────────────────────────────────────────────
# Bootloader generation limit (rollback window)
# ─────────────────────────────────────────────
boot.loader.systemd-boot.configurationLimit = 3;
# If you're using GRUB instead, use this instead:
# boot.loader.grub.configurationLimit = 3;
# ─────────────────────────────────────────────
# Nix garbage collection (tight retention)
# ─────────────────────────────────────────────
nix.gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 3d";
};
# ─────────────────────────────────────────────
# Store optimisation (reduce disk bloat)
# ─────────────────────────────────────────────
nix.settings.auto-optimise-store = true;
# ─────────────────────────────────────────────
# Optional: keep system leaner overall
# (reduces leftover system profiles slightly)
# ─────────────────────────────────────────────
nix.settings.keep-outputs = false;
nix.settings.keep-derivations = false;
}