From 84cf714b1e41414abdd5e38acbed3748a02507c7 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 22 Nov 2026 19:23:36 +0000 Subject: 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. --- pkgs/claude-remote.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkgs/claude-remote.nix') 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." -- cgit v1.3.1