name: "vscode-{account_name}"
base_image: "ubuntu-24.04"
memory: 4096
vcpus: 2
packages:
  - curl
  - wget
  - git
  - fonts-noto
  - ca-certificates
  - gnupg
  - apt-transport-https
apps:
  - code
services: []
paths:
  shared:
    - host: "~/github"
      guest: "/home/dev/github"
      mode: "rw"
  clone:
    - "~/.config/Code/User/settings.json"
    - "~/.config/Code/User/keybindings.json"
gui: true
spice: true
cloud_init:
  write_files:
    - path: /home/dev/.env
      content: |
        AI_PROXY_URL=http://10.0.0.1:4000
      permissions: "0600"
      owner: "dev:dev"
  runcmd:
    - curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/vscode.gpg
    - echo "deb [signed-by=/usr/share/keyrings/vscode.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list
    - apt-get update && apt-get install -y code
    - |
      mkdir -p /home/dev/.config/Code/User
      cat > /home/dev/.config/Code/User/settings.json <<'EOF'
      {
        "roo-code.apiBase": "http://10.0.0.1:4000/v1"
      }
      EOF
      chown -R dev:dev /home/dev/.config/Code
