|
| 1 | +#cloud-config |
| 2 | +autoinstall: |
| 3 | + version: 1 |
| 4 | + source: |
| 5 | + search_drivers: true |
| 6 | + id: ubuntu-desktop-minimal |
| 7 | + # https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2097769 |
| 8 | + network: |
| 9 | + version: 2 |
| 10 | + ethernets: |
| 11 | + eno1: |
| 12 | + dhcp4: false |
| 13 | + dhcp6: false |
| 14 | + optional: true |
| 15 | + wlp0s20f3: |
| 16 | + dhcp4: true |
| 17 | + dhcp6: false |
| 18 | + optional: true |
| 19 | + bridges: |
| 20 | + br0: |
| 21 | + interfaces: |
| 22 | + - eno1 |
| 23 | + dhcp4: true |
| 24 | + dhcp6: false |
| 25 | + accept-ra: false |
| 26 | + link-local: [] |
| 27 | + parameters: |
| 28 | + stp: false |
| 29 | + forward-delay: 0 |
| 30 | + storage: |
| 31 | + config: |
| 32 | + - ptable: gpt |
| 33 | + serial: WDC_WDS200T2B0B-00YS70_21044J800564 |
| 34 | + wwn: '0x5001b448be743398' |
| 35 | + path: /dev/sda |
| 36 | + preserve: true |
| 37 | + name: '' |
| 38 | + grub_device: false |
| 39 | + id: disk-sda |
| 40 | + type: disk |
| 41 | + - device: disk-sda |
| 42 | + size: 104857600 |
| 43 | + flag: boot |
| 44 | + number: 1 |
| 45 | + preserve: true |
| 46 | + grub_device: true |
| 47 | + offset: 1048576 |
| 48 | + partition_type: c12a7328-f81f-11d2-ba4b-00a0c93ec93b |
| 49 | + path: /dev/sda1 |
| 50 | + uuid: 78fa767e-7d35-4893-b5ed-4341d691e18a |
| 51 | + id: partition-sda1 |
| 52 | + type: partition |
| 53 | + - device: disk-sda |
| 54 | + size: 16777216 |
| 55 | + flag: msftres |
| 56 | + number: 2 |
| 57 | + preserve: true |
| 58 | + grub_device: false |
| 59 | + offset: 105906176 |
| 60 | + partition_type: e3c9e316-0b5c-4db8-817d-f92df00215ae |
| 61 | + path: /dev/sda2 |
| 62 | + uuid: 6d2cd641-68da-4a93-9c8d-8eb634887988 |
| 63 | + id: partition-sda2 |
| 64 | + type: partition |
| 65 | + - device: disk-sda |
| 66 | + size: 949364981760 |
| 67 | + number: 3 |
| 68 | + preserve: true |
| 69 | + grub_device: false |
| 70 | + offset: 122683392 |
| 71 | + partition_type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 |
| 72 | + path: /dev/sda3 |
| 73 | + uuid: 033b2f8e-ccce-4502-849b-e2148d30b3eb |
| 74 | + id: partition-sda3 |
| 75 | + type: partition |
| 76 | + - device: disk-sda |
| 77 | + size: 781189120 |
| 78 | + number: 4 |
| 79 | + preserve: true |
| 80 | + grub_device: false |
| 81 | + offset: 949487665152 |
| 82 | + partition_type: de94bba4-06d1-4d40-a16a-bfd50179d6ac |
| 83 | + path: /dev/sda4 |
| 84 | + uuid: 2943b597-e9f3-4c24-a346-9c1e805060e7 |
| 85 | + id: partition-sda4 |
| 86 | + type: partition |
| 87 | + - device: disk-sda |
| 88 | + size: 1017118720 |
| 89 | + number: 5 |
| 90 | + preserve: true |
| 91 | + grub_device: false |
| 92 | + offset: 950269902848 |
| 93 | + partition_type: de94bba4-06d1-4d40-a16a-bfd50179d6ac |
| 94 | + path: /dev/sda5 |
| 95 | + uuid: 6b313691-6b88-4623-a156-537604c63719 |
| 96 | + id: partition-sda5 |
| 97 | + type: partition |
| 98 | + - device: disk-sda |
| 99 | + size: 1049110773760 |
| 100 | + wipe: superblock |
| 101 | + number: 6 |
| 102 | + preserve: false |
| 103 | + offset: 951287021568 |
| 104 | + path: /dev/sda6 |
| 105 | + id: partition-0 |
| 106 | + type: partition |
| 107 | + - fstype: ext4 |
| 108 | + volume: partition-0 |
| 109 | + preserve: false |
| 110 | + id: format-0 |
| 111 | + type: format |
| 112 | + - path: / |
| 113 | + device: format-0 |
| 114 | + id: mount-1 |
| 115 | + type: mount |
| 116 | + - fstype: vfat |
| 117 | + volume: partition-sda1 |
| 118 | + preserve: true |
| 119 | + id: format-partition-sda1 |
| 120 | + type: format |
| 121 | + - path: /boot/efi |
| 122 | + device: format-partition-sda1 |
| 123 | + id: mount-0 |
| 124 | + type: mount |
| 125 | + timezone: UTC |
| 126 | + locale: en_US.UTF-8 |
| 127 | + keyboard: |
| 128 | + layout: us |
| 129 | + kernel: |
| 130 | + flavor: hwe |
| 131 | + updates: all |
| 132 | + ssh: |
| 133 | + install-server: true |
| 134 | + allow-pw: true |
| 135 | + apt: |
| 136 | + preserve_sources_list: false |
| 137 | + mirror-selection: |
| 138 | + primary: |
| 139 | + # http://archive.ubuntu.com/ubntu |
| 140 | + - uri: "https://crake-nexus.org.boxcutter.net/repository/ubuntu-archive-apt-proxy/ubuntu" |
| 141 | + arches: [i386, amd64] |
| 142 | + # http://ports.ubuntu.com/ubuntu-ports |
| 143 | + - uri: "https://crake-nexus.org.boxcutter.net/repository/ubuntu-ports-proxy/ubuntu-ports" |
| 144 | + arches: [s390x, arm64, armhf, powerpc, ppc64el, riscv64] |
| 145 | + late-commands: |
| 146 | + # Because we're using preserve_hostname to allow manual setting of the |
| 147 | + # hostname, set an initial hostname manually - the identity block requires |
| 148 | + # a username and it doesn't support flexible enough configuration |
| 149 | + # NOTE: 'curtin in-target' doesn't invoke a shell, so you need to run |
| 150 | + # commands within a shell that need redirection. |
| 151 | + - curtin in-target -- sh -c 'echo wendy-NUC10i5FNH > /etc/hostname' |
| 152 | + # Seed the already ran marker for gnome-initial-setup so new users inherit |
| 153 | + - curtin in-target -- mkdir -p /etc/skel/.config |
| 154 | + - curtin in-target -- touch /etc/skel/.config/gnome-initial-setup-done |
| 155 | + # Run updates at our own cadence |
| 156 | + - curtin in-target -- systemctl disable apt-daily.timer |
| 157 | + - curtin in-target -- systemctl disable apt-daily-upgrade.timer |
| 158 | + - curtin in-target -- systemctl mask apt-daily.service |
| 159 | + - curtin in-target -- systemctl mask apt-daily-upgrade.service |
| 160 | + - curtin in-target -- sh -c 'sed -i "s/^APT::Periodic::Update-Package-Lists.*/APT::Periodic::Update-Package-Lists \"0\";/g" /etc/apt/apt.conf.d/20auto-upgrades' |
| 161 | + - curtin in-target -- sh -c 'sed -i "s/^APT::Periodic::Unattended-Upgrade.*/APT::Periodic::Unattended-Upgrade \"0\";/g" /etc/apt/apt.conf.d/20auto-upgrades' |
| 162 | + - curtin in-target -- sh -c 'sed -i "s/^APT::Periodic::.Download-Upgradeable-Packages */APT::Periodic::Download-Upgradeable-Packages \"0\";/g" /etc/apt/apt.conf.d/20auto-upgrades' |
| 163 | + - curtin in-target -- sh -c 'sed -i "s/^APT::Periodic::.AutocleanInterval */APT::Periodic::AutocleanInterval \"0\";/g" /etc/apt/apt.conf.d/20auto-upgrades' |
| 164 | + - curtin in-target -- sh -c 'snap refresh --hold || true' |
| 165 | + - curtin in-target -- sh -c 'echo "Hidden=true" >> /etc/xdg/autostart/update-notifier.desktop' |
| 166 | + - curtin in-target -- systemctl disable update-notifier-download.timer || true |
| 167 | + - curtin in-target -- systemctl disable update-notifier-motd.timer || true |
| 168 | + user-data: # cloud-init starts here |
| 169 | + preserve_hostname: true |
| 170 | + users: |
| 171 | + # Temporary user used for initial bootstrapping with CM tool |
| 172 | + - name: autobot |
| 173 | + uid: 63112 |
| 174 | + primary_group: users |
| 175 | + groups: users |
| 176 | + shell: /bin/bash |
| 177 | + # Testing with a plaintext password |
| 178 | + plain_text_passwd: superseekret |
| 179 | + # Replace with your generated salted SHA-512 hash using 'openssl passwd -6' |
| 180 | + # passwd: "$6$W32sh2s3EDp01J$ajF/6iHYX1Ef2pF5mPi..zBFiU4Qzvnif.hT2MB.dZ9mSx6txdPiz..." |
| 181 | + sudo: ALL=(ALL) NOPASSWD:ALL |
| 182 | + lock_passwd: false |
| 183 | + ssh_authorized_keys: |
| 184 | + # taylor |
| 185 | + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEWerEkujoB7ipGnWJwnPGFu3DuUQJtc1zB6YqjGRziE sheila |
| 186 | + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINRK4hkcpUiaSkiLEytgwMYcKylBioXPLx1TnwJFrLPl mahowald |
| 187 | + chpasswd: {expire: false} |
| 188 | + ssh_pwauth: true |
| 189 | + # DBus doesn't appear to be active in late-commands, so wait to configure |
| 190 | + # power saving defaults until cloud-init time, plus cloud-init has |
| 191 | + # a nice module to write out files |
| 192 | + write_files: |
| 193 | + # Configure system-wide defaults to disable screen blanking |
| 194 | + - path: /etc/dconf/db/local.d/00-screensaver |
| 195 | + content: | |
| 196 | + [org/gnome/desktop/session] |
| 197 | + idle-delay=uint32 0 |
| 198 | +
|
| 199 | + [org/gnome/desktop/screensaver] |
| 200 | + lock-enabled=false |
| 201 | + idle-activation-enabled=false |
| 202 | +
|
| 203 | + [org/gnome/settings-daemon/plugins/power] |
| 204 | + sleep-inactive-ac-type="nothing" |
| 205 | + sleep-inactive-battery-type="nothing" |
| 206 | + idle-dim=false |
| 207 | + # Configure system to refer to user settings in ~/.config/dconf/user |
| 208 | + # database first, then look for system-wide defaults in |
| 209 | + # /etc/dconf/db/local |
| 210 | + - path: /etc/dconf/profile/user |
| 211 | + content: | |
| 212 | + user-db:user |
| 213 | + system-db:local |
| 214 | + runcmd: |
| 215 | + # Update the GNOME system database with the changes to /etc/dconf |
| 216 | + # above |
| 217 | + - dconf update |
0 commit comments