fix: restore updater lock ownership and current orchestrator model

This commit is contained in:
notplants
2026-11-23 18:09:14 +00:00
parent 46dcba8fdb
commit 04f9bfc4dd
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -128,6 +128,9 @@ in
state() { printf '%s result=%s generation=%s note=%s\n' "$(date -u +%FT%TZ)" "$1" "$2" "$3" > ${stateFile}; chown ${cfg.buildUser} ${stateFile} || true; }
PREV=$(readlink -f /run/current-system)
LOCK_BAK=${cfg.flakePath}/.flake.lock.auto-update-prev
# A manual root-side flake operation can leave the lock root-owned. The
# updater runs nix as buildUser, so restore its write access first.
chown ${cfg.buildUser} flake.lock
if ! ${busyGate}; then
state skipped "$PREV" busy