summaryrefslogtreecommitdiff
path: root/systemd/user
diff options
context:
space:
mode:
Diffstat (limited to 'systemd/user')
-rw-r--r--systemd/user/claude-code@.service17
1 files changed, 17 insertions, 0 deletions
diff --git a/systemd/user/claude-code@.service b/systemd/user/claude-code@.service
new file mode 100644
index 0000000..e3983b6
--- /dev/null
+++ b/systemd/user/claude-code@.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Claude Code Remote Session (%i)
+After=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+WorkingDirectory=/home/yyamashita/workspaces/repos/%i
+ExecStart=/usr/bin/tmux new-session -d -s claude-%i -c /home/yyamashita/workspaces/repos/%i /usr/local/bin/claude --remote-control %i --dangerously-skip-permissions
+ExecStop=/usr/bin/tmux kill-session -t claude-%i
+Environment=HOME=/home/yyamashita
+Environment=USER=yyamashita
+Environment=XDG_RUNTIME_DIR=/run/user/1000
+Environment=TMUX_TMPDIR=/tmp
+
+[Install]
+WantedBy=default.target