feat(nixos): prune system+HM gens after 14d, keep ≥3 past (#128)
Some checks failed
Check / eval (push) Has been cancelled

Weekly nomarchy-gen-prune deletes only generations that are both older
than 14 days and beyond the three most recent past gens (current always
kept), for system and Home Manager profiles. Stock nix.gc no longer uses
--delete-older-than. checks.gen-prune covers selection self-test and
unit wiring; doctor points at the new tool when disk is tight.
This commit is contained in:
2026-07-15 11:59:26 +01:00
parent 1f6f21249e
commit e4800d7d8e
9 changed files with 344 additions and 45 deletions

View File

@@ -65,6 +65,11 @@ broken one. Make the fix stick from the working boot: revert the change
in `~/.nomarchy` (`git -C ~/.nomarchy revert …` or edit `system.nix`
back), then `nomarchy-rebuild`.
**Automatic prune (#128):** a weekly timer (`nomarchy-gen-prune`) removes
system *and* Home Manager generations that are **older than 14 days** and
**beyond the three most recent past gens** (current + ≥3 past always kept).
Manual: `sudo nomarchy-gen-prune` (or `--dry-run`).
## 4. Files went missing or wrong — snapshots (BTRFS installs)
With `nomarchy.system.snapper.enable` (the installer's default on