From 6356f9b408deac52a8227cf5a15830e68b95a8a8 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Fri, 10 Jul 2026 14:46:26 +0100 Subject: [PATCH] docs(agent): NEXT #76 hibernation default + zram Promote hibernation+zram product intent to the queue head; [big] with design/module/installer/V3 slices. FUTURE stub points at #76. --- agent/BACKLOG.md | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/agent/BACKLOG.md b/agent/BACKLOG.md index 6ad2989..499375c 100644 --- a/agent/BACKLOG.md +++ b/agent/BACKLOG.md @@ -24,11 +24,34 @@ in [`docs/ROADMAP.md`](../docs/ROADMAP.md); map in ## NOW -*(empty — NEXT is empty; see LATER / FUTURE / PROPOSED)* +*(empty — NEXT's top item is the queue head)* ## NEXT -*(empty — no actionable queue head; #20 deferred to FUTURE)* +### 76. Hibernation default + zram `[big]` +**Product intent (Bernardo 2026-07-10):** hibernation on by default; +zram on alongside for live memory pressure. Disk swap ≥ RAM for the +hibernate image; zram high-priority for day-to-day swap (not sufficient +alone for resume). + +**Scope (split before/while implementing — do not land as one mega-PR):** + +1. **Design** — installer disk layout (swapfile size = RAM? partition?), + `resume`/`resume_offset`, LUKS + systemd-initrd resume, priority + (zram > disk), interaction with existing `@swap` / `swapSize` disko + path, what to do when swap was installed as `"0"`. +2. **Module** — NixOS: `zramSwap.enable`, disk swap + hibernation + (`boot.resumeDevice` / swapfile resume), menu or documented power + path for Hibernate (already in Power menu if swap works). +3. **Installer** — new installs create hibernation-capable swap by + default; document migration for existing machines (add swapfile + + rebuild). +4. **Verify** — V0/V1: eval + unit/config assertions; V2: VM resume if + feasible; **V3**: real laptop hibernate → power off → resume + (HARDWARE-QUEUE). Encrypted root is the hard case. + +**Out of scope:** TLP changes; formatter. Prefer boring NixOS knobs over +custom scripts. ## LATER @@ -66,6 +89,19 @@ the `vm-checks` job in `.gitea/workflows/check.yml` (`runs-on: nix-kvm`, `nix flake check` + toplevel/HM builds). Do not enable the job until that label is online (Gitea queues forever otherwise). +### Formatter — adopt later `[human]` +**Intent:** add a Nix formatter (likely `nixfmt-rfc-style`) in a dedicated +pass: reformat the tree once, document in CONVENTIONS, optional CI +check. **Not** the queue head — no drive-by reformats until that pass. + +### Hibernation default + optional zram +**Intent:** hibernation on by default (disk swap + resume). **zram is +compatible** if disk swap remains for the hibernation image; zram only +helps *live* memory pressure (compressed RAM swap), not resume-after- +poweroff. Prefer: high-priority zram for day-to-day + lower-priority +disk swap ≥ RAM for hibernate. Design before NEXT (installer layout, +encrypted root, `resume_offset`). + ## PROPOSED (agent suggestions — await human triage) *Agents: append here with a one-paragraph pitch (what/why/cost). Do not