fix(beefcake/impermanence): boot the ephemeral root fully — sops initrd identity + /var parent perms #727
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "beefcake-impermanence-boot-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Second wave of fixes for the beefcake impermanence flip. Machine-id (#726) got PID1 up; this gets the service graph up, adds a VM regression guard, and makes the host identity recoverable. Validated in place on the live impermanent root (outage tolerated — pebble catching mail): after these fixes beefcake reached
systemctl is-system-running == running, 0 failed units, on the ephemeral root — first fully-working flip.Commits
sops-install-secretsruns in initrd activation and sops-nix's key paths don't followservices.openssh.hostKeys— they default to hardcoded/etc/ssh/*(absent on@blankthat early) +/var/lib/sops-nix/key.txt(stage-2 bind, never persisted). →/run/secretsempty → knot/stalwart/kanidm/… down. Fix: point sops at the persisted ed25519 key (readable in initrd;/persistis stage-1neededForBoot). Drop the RSA-GPG path./var,/var/lib,/var/cachecame up0700→ non-root service users can't traverse into/varto reach theirStateDirectory. impermanence propagates the/persistsource-parent mode, and/persist/var{,/lib}were0700. Fix: tmpfilesd /var 0755(+ lib, cache) re-asserts0755afterlocal-fs, before services — self-corrects any from-scratch/persist.-- --bootfootgun (was passing--boottonix build= silent live-switch) →deploy --boot … --hostname 192.168.0.9(LAN, not VPN — headscale). Adds Part 6: Retry #3 (the reboot test) with the no-downgrade pre-flight./var-perms bug in a clean-room VM (non-root service + persisted/var/libdir + forced0700/persistsource) and assert the fix. Passed on dragon: "all 0755 despite 0700 /persist source", "varprobe (non-root) wrote + kept its marker through the wipe".secrets/beefcake/host-identity.ymlencrypted to the master key so identity is recoverable. Roundtrip-verified. NOT a runtimesops.secretsentry (circular — the key is what sops needs to decrypt) → inert to build/reboot; recovery is an off-host, master-key, pre-first-boot lay-down (documented in the runbook).Version safety
main+ config-only diff — noflake.lockchange. Builds26.05.20260623.667d5cf, the exact nixpkgs beefcake runs now. Not a downgrade, not cross-release — config + initrd change only, no toolchain re-exec to wedge on. Reboot required (initrd change), but no live activation (--boot).Not reboot-stable until deployed
The live host runs the old flip closure with these fixes hand-applied. Retry #3 = deploy this
--boot+ reboot (Daniel-driven, LAN, iDRAC visibility). Clean-boot assertions:ls /run/secrets | wc -l(~44),stat -c '%a' /var /var/lib(755),is-system-running(running). Merge follows the reboot proof (verify-before-merge).Remaining follow-up (its own PR)
Optionally decouple the sops identity from the ssh host key onto a dedicated intentional age key (add-recipient-without-remove +
updatekeys, ssh-derived key kept as fallback). Deferred — not needed for a working impermanent boot.🤖 Generated with Claude Code
https://claude.ai/code/session_01G7HHrn1sxz4ozvREyHmi4i
a23ac646a526487ec2f9