tailscale and user groups
This commit is contained in:
parent
6447486643
commit
f733a5238c
7 changed files with 113 additions and 217 deletions
12
executables/claude-code.sh
Normal file
12
executables/claude-code.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SSH_TARGET="sandbox@vsock%3"
|
||||
|
||||
if [[ "$PWD" == /home/user* ]] || [[ "$PWD" == /etc/nixos* ]]; then
|
||||
project="${PWD/\/home\/user/\/home\/sandbox}"
|
||||
else
|
||||
project="$(ssh "$SSH_TARGET" 'mktemp -d -p /tmp claude-XXXXXX')"
|
||||
fi
|
||||
|
||||
exec ssh -t "$SSH_TARGET" claude-code "$project" "$@"
|
||||
|
|
@ -3,7 +3,7 @@ set -euo pipefail
|
|||
|
||||
SSH_TARGET="sandbox@vsock%3"
|
||||
|
||||
if [[ "$PWD" == /home/user* ]]; then
|
||||
if [[ "$PWD" == /home/user* ]] || [[ "$PWD" == /etc/nixos* ]]; then
|
||||
project="${PWD/\/home\/user/\/home\/sandbox}"
|
||||
else
|
||||
project="$(ssh "$SSH_TARGET" 'mktemp -d -p /tmp opencode-XXXXXX')"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue