Skip to content

Instantly share code, notes, and snippets.

@skhaz
Last active January 20, 2025 11:40
Show Gist options
  • Select an option

  • Save skhaz/f43afab4b28b1fde23ff9fb3de821c42 to your computer and use it in GitHub Desktop.

Select an option

Save skhaz/f43afab4b28b1fde23ff9fb3de821c42 to your computer and use it in GitHub Desktop.
Ubuntu Autoinstall
#cloud-config
autoinstall:
version: 1
source:
id: ubuntu-desktop-minimal
identity:
hostname: orbital
username: kashmir
password: "$6$psBe8CEg/e8JW5a3$zTghAora5FbxV6wReueN14WiLO5TLK09co87QUp6LvWaT.hNgDVmwIGc6YClE8.YpDYaiYCNntrO4JfNLGx/B1"
locale: en_US.UTF-8
keyboard:
layout: us
timezone: UTC
shutdown: reboot
storage:
layout:
name: lvm
sizing-policy: all
password: password
reset-partition: true
preserve: false
drivers:
install: true
packages:
- realvnc-vnc-server
- tailscale
- ubuntu-drivers-common
- ubuntu-restricted-extras
refresh-installer:
update: yes
user-data:
package_update: true
package_upgrade: true
runcmd:
- mkdir -p /home/kashmir/.ssh
- curl -fsSL https://github.com/skhaz.keys > /home/kashmir/.ssh/authorized_keys
- chown -R kashmir:kashmir /home/kashmir/.ssh
- chmod 700 /home/kashmir/.ssh
- chmod 600 /home/kashmir/.ssh/authorized_keys
- ubuntu-drivers autoinstall
late-commands:
- |
curtin in-target --target=/target -- /bin/bash -c \
"systemctl enable realvnc-vnc-server"
- |
curtin in-target --target=/target -- /bin/bash -c \
"systemctl enable ssh --now"
- |
curtin in-target --target=/target -- /bin/bash -c \
"tailscale up --accept-dns --auth-key=replace_with_tailscale_auth_key"
ssh:
install-server: true
allow-pw: no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment