Skip to content

Instantly share code, notes, and snippets.

@goughjt
Created December 13, 2017 00:15
Show Gist options
  • Save goughjt/9a7e9b66217bda54893cb1474fa0968e to your computer and use it in GitHub Desktop.
Save goughjt/9a7e9b66217bda54893cb1474fa0968e to your computer and use it in GitHub Desktop.
user data YAML for flashing hyprtio OS v1.7.1 to raspberry pi with wifi - assumes using ssh-keygen
# You need to change any variables wrapped <like-this> to your own variables.
#cloud-config
hostname: <hostname>
manage_etc_hosts: true
users:
- name: <username>
primary-group: users
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users,docker,adm,dialout,audio,plugdev,netdev,video
ssh-import-id: None
lock_passwd: true
ssh-authorized-keys:
- <ssh-rsa-contents>
write_files:
- content: |
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
path: /etc/network/interfaces.d/wlan0
- content: |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="<ssid>"
psk="<psk>"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}
path: /etc/wpa_supplicant/wpa_supplicant.conf
runcmd:
- [ systemctl, restart, avahi-daemon ]
- [ ifup, wlan0 ]
bootcmd:
- [ ifup, wlan0 ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment