#cloud-config # Unattended install for main-desktop. scripts/build-iso.sh fills in the placeholders # and drops this on the ISO as /nocloud/user-data. autoinstall: version: 1 # Stock Ubuntu desktop, not the -minimal variant, so LibreOffice and the usual # desktop apps come along as debs. source: id: ubuntu-desktop # This is what installs the NVIDIA driver (the recommended open branch on this # hardware), so the GPU works on first boot and Flatpak can match its GL runtime # straight away. codecs pulls ubuntu-restricted-addons. drivers: install: true codecs: install: true identity: realname: '@@REALNAME@@' username: '@@USERNAME@@' hostname: '@@HOSTNAME@@' password: '@@PASSWORD_HASH@@' # ONE disk is touched, matched by serial. @@TARGET_MODEL@@ is the target; the other # NVMe in this machine never matches, and if nothing matches, the install stops # instead of guessing. That also means this ISO can't wipe a different machine. storage: layout: name: direct match: serial: '@@TARGET_SERIAL@@' packages: - git - curl - ca-certificates late-commands: # Bake this repo into the installed system and arm the one-shot first-boot run # of setup.sh, which installs everything in flatpaks.txt and the rest. - cp -r /cdrom/main-desktop /target/opt/main-desktop - chmod +x /target/opt/main-desktop/scripts/firstboot.sh /target/opt/main-desktop/scripts/setup.sh - cp /cdrom/main-desktop/iso/main-desktop-firstboot.service /target/etc/systemd/system/ # Passwordless sudo so the first-boot run doesn't stall on a password prompt. # firstboot.sh deletes this again on its way out, pass or fail. - >- printf '%s ALL=(ALL) NOPASSWD:ALL\n' '@@USERNAME@@' > /target/etc/sudoers.d/99-main-desktop-firstboot - chmod 440 /target/etc/sudoers.d/99-main-desktop-firstboot - curtin in-target -- systemctl enable main-desktop-firstboot.service shutdown: reboot