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

@@ -19,6 +19,17 @@ Template:
---
## 2026-07-15 — #128 generation prune (14d + keep ≥3 past, system+HM)
- **Task:** Implement auto-prune for system and Home Manager generations.
- **Did:** `pkgs/nomarchy-gen-prune` + `modules/nixos/gen-prune.nix` weekly
timer; pure select (current + 3 past always; else drop if age>14d); store
GC without `--delete-older-than`; bootloader refresh after system prune.
Doctor fix + RECOVERY note. Closed #128.
- **Verified:** V0/V1 — `checks.gen-prune` (self-test + dry-run + timer
assert + no age-only gc options). V3: run on a multi-gen box.
- **Pending:** V3 on real machine with many gens.
- **Next suggestion:** human #115/#120, or hardware queue.
## 2026-07-15 — File #128 generation auto-prune policy (no code)
- **Task:** Bernardo: auto-clean gens older than N days but always keep
≥3 past; include HM; prefer 14d over 30d.