diff options
| author | tv <tv@krebsco.de> | 2026-11-22 19:23:36 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-22 19:37:36 +0000 |
| commit | 84cf714b1e41414abdd5e38acbed3748a02507c7 (patch) | |
| tree | 3438ea29dcffdbf49b6c1ed9e96592da66b4805e /pkgs | |
| parent | f446498e11f087c66fb9b0e53a707c493f46d217 (diff) | |
configs/claude: the remotes wait for the login
Remote Control needs a login, and the units answer its questions in
~/.claude.json, which may come before it: so the units have
ConditionPathExists on ~/.claude/.credentials.json (skipped, not
failed, before the login), and a path unit on it starts the restore
service, which starts the static remotes now, too, and the dynamic
ones: at boot, if there's a login already, or else as soon as there
is. The restore service isn't multi-user.target's anymore, and
remains active, once done, so the path unit starts it once.
claude-remote start refuses before the login, as the unit would be
skipped, and forgotten.
Diffstat (limited to 'pkgs')
| -rw-r--r-- | pkgs/claude-remote.nix | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/claude-remote.nix b/pkgs/claude-remote.nix index c692be1..d8975e6 100644 --- a/pkgs/claude-remote.nix +++ b/pkgs/claude-remote.nix @@ -432,6 +432,9 @@ let ;; start) name_arg "''${1-}" + # before the login, the unit would be skipped, and not come back + test -e "$home/.claude/.credentials.json" || + die "there's no login yet: runuser -l claude -c 'claude auth login' (then the remotes start)" systemctl start "$(unit "$1")" if ! is_static "$1"; then echo "$1 is dynamic: it lasts, across reboots, until claude-remote stop $1." |
