feat: Add workspace container with claude auto-start

- Create cfg/claude.service for systemd auto-start of Claude Code
- Enable claude.service on container boot
- Update install.sh to automatically create workspace container
- Update aios.zsh to start workspace and connect when shell:true
- Add machinectl to sudoers NOPASSWD for ai user
- Workspace container starts on login, claude.service auto-runs inside
This commit is contained in:
Claude
2025-11-07 06:02:40 +00:00
parent ab50bc29f0
commit ff161f84a0
5 changed files with 41 additions and 6 deletions

View File

@@ -18,11 +18,21 @@ SHELL_MODE=$(cat "$CONFIG_FILE" | jq -r '.shell // false')
if [ "$SHELL_MODE" = "true" ]; then
echo "aios - AI-managed OS"
echo " Shell mode enabled"
echo " Starting workspace container..."
echo ""
# claudeを起動
if command -v claude &>/dev/null; then
exec claude
# Check if workspace exists
if ! sudo machinectl list-images | grep -q "^workspace"; then
echo "Error: workspace container not found"
echo "Please run install.sh first to create workspace container"
return
fi
# Start workspace container
sudo machinectl start workspace 2>/dev/null || true
sleep 2
# Login to workspace (claude.service will auto-start inside)
echo "Connecting to workspace container..."
exec sudo machinectl login workspace
fi