feat: add yolo host
New NixOS VM on proxmox, replacing the Ubuntu box. Reuses the existing Hyprland config; remote access is Sunshine/Moonlight rather than xrdp, since xrdp cannot drive a wayland compositor. Two fixes here are not yolo-specific and affect any fresh install: git at system level (nix needs it for the type = "git" hyprland input, but git only came from home-manager, so neither rebuild could run), and dropping the yogurt input, whose private repo made home-manager un-evaluatable without GitHub auth. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
# Launch a Claude Code Remote Control server for one project dir.
|
||||
# Invoked by claude-rc@.service; arg is the project path.
|
||||
set -euo pipefail
|
||||
|
||||
dir="${1:?usage: claude-rc-run <project-dir>}"
|
||||
|
||||
if [ ! -d "$dir" ]; then
|
||||
echo "claude-rc-run: no such directory: $dir" >&2
|
||||
exit 78 # EX_CONFIG - systemd won't spin on Restart=on-failure
|
||||
fi
|
||||
|
||||
# --spawn worktree needs a git repo; fall back to same-dir if not one
|
||||
spawn=worktree
|
||||
git -C "$dir" rev-parse --git-dir >/dev/null 2>&1 || {
|
||||
echo "claude-rc-run: $dir is not a git repo, using --spawn same-dir" >&2
|
||||
spawn=same-dir
|
||||
}
|
||||
|
||||
# Optional display name: a projects-file line may read
|
||||
# /path/to/repo | My Display Name
|
||||
# Falls back to the bare directory name.
|
||||
LIST="${CLAUDE_RC_LIST:-$HOME/.config/claude-rc/projects}"
|
||||
name=$(awk -F'|' -v t="$dir" '
|
||||
{ line=$0; sub(/#.*/,"",line)
|
||||
p=line; if (index(line,"|")) { p=substr(line,1,index(line,"|")-1) }
|
||||
gsub(/^[[:space:]]+|[[:space:]]+$/,"",p); sub(/\/+$/,"",p)
|
||||
if (p == t && index(line,"|")) {
|
||||
n=substr(line,index(line,"|")+1)
|
||||
gsub(/^[[:space:]]+|[[:space:]]+$/,"",n)
|
||||
if (n != "") { print n; exit }
|
||||
}
|
||||
}' "$LIST" 2>/dev/null || true)
|
||||
[ -n "$name" ] || name="$(basename "$dir")"
|
||||
|
||||
cd "$dir"
|
||||
exec claude remote-control \
|
||||
--spawn "$spawn" \
|
||||
--permission-mode bypassPermissions \
|
||||
--name "$name"
|
||||
Reference in New Issue
Block a user