Skip to content

mini: lifeline daemons wait for /nix/store so they survive a reboot - #60

Merged
Jish2 merged 1 commit into
mainfrom
lifelines-wait-for-nix-store
Nov 3, 2026
Merged

Jish2 merged 1 commit into
mainfrom
lifelines-wait-for-nix-store

Conversation

@Jish2

@Jish2 Jish2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner

mini rebooted on 10-28, and since then neither of its nix-managed ssh lifelines, org.jgoon.tailscaled and org.jgoon.cloudflared-ssh, has been running. Both exited once with 78 (EX_CONFIG), and launchd never started them again. mini was reachable only because of the hand-made org.jgoon.cloudflared-ssh-recovery LaunchAgent, which runs brew's cloudflared and only while someone is logged in. make doctor caught the tailscaled half of this.

Cause: both plists exec straight into /nix/store, and at boot launchd can start them before the nix volume is mounted. A spawn failure counts as EX_CONFIG, which launchd doesn't retry, KeepAlive or not. Both daemons now use nix-darwin's command, which wraps them in /bin/wait4path /nix/store && (Home Manager agents such as auto-compact already get that wrapper). The binaries and arguments are the same as before.

Checked: darwinConfigurations.mini.system builds, and both generated plists are the old command behind /bin/sh -c "/bin/wait4path /nix/store && exec …".

Created with Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Nov 3, 2026

Copy link
Copy Markdown

Claude review: no issues found

Checked the full diff (tailscaled.nix, cloudflared-ssh.nix) for bugs; no CLAUDE.md files exist in the repo. The switch to nix-darwin's command keeps the same binaries and arguments and adds the wait4path wrapper; no prior reviews or comments to reconcile.

Approved: all approval conditions hold.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small, correct switch to nix-darwin's wait4path-wrapped command; no issues found.

@Jish2
Jish2 merged commit e8175ec into main Nov 3, 2026
2 checks passed
@Jish2
Jish2 deleted the lifelines-wait-for-nix-store branch November 3, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant