name: "cursor-{account_name}"
base_image: "ubuntu-24.04"
memory: 6144
vcpus: 4
packages:
  - curl
  - wget
  - git
  - fonts-noto
  - ca-certificates
  - gnupg
  - libgtk-3-0
  - libnss3
  - libatk-bridge2.0-0
  - libdrm2
  - libgbm1
apps:
  - cursor
services: []
paths:
  shared:
    - host: "~/github"
      guest: "/home/dev/github"
      mode: "rw"
  clone:
    - "~/.config/Cursor/User/settings.json"
    - "~/.config/Cursor/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://downloader.cursor.sh/linux/appImage/x64 -o /tmp/cursor.AppImage
    - chmod +x /tmp/cursor.AppImage
    - mv /tmp/cursor.AppImage /usr/local/bin/cursor
    - |
      mkdir -p /home/dev/.config/Cursor/User
      cat > /home/dev/.config/Cursor/User/settings.json <<'EOF'
      {
        "cursor.apiBase": "http://10.0.0.1:4000/v1",
        "cursor.byok.enabled": true
      }
      EOF
      chown -R dev:dev /home/dev/.config/Cursor
