Last active
December 20, 2025 15:03
-
-
Save lbr88/9f64497d82ca441e7378294c7192d97b to your computer and use it in GitHub Desktop.
Ubuntu 24.04 autoinstall configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #cloud-config | |
| # Ubuntu 24.04 Autoinstall Configuration | |
| # This file automates the installation of Ubuntu 24.04 with LVM encryption | |
| # and automatically configures the system with dotfiles from this repository | |
| autoinstall: | |
| version: 1 | |
| # Interactive sections - prompt user during installation | |
| # These sections will be shown as interactive forms during installation | |
| interactive-sections: | |
| - storage | |
| - identity | |
| # Locale and keyboard configuration | |
| locale: en_US.UTF-8 | |
| keyboard: | |
| layout: dk | |
| variant: '' | |
| # Timezone configuration | |
| timezone: Europe/Copenhagen | |
| # Network configuration - use DHCP | |
| network: | |
| network: | |
| version: 2 | |
| ethernets: | |
| any: | |
| match: | |
| name: en* | |
| dhcp4: true | |
| dhcp6: true | |
| # Storage configuration - LVM with encryption | |
| # You will be prompted to configure this during installation | |
| storage: | |
| layout: | |
| name: lvm | |
| encrypted: true | |
| # User account configuration | |
| # This section is interactive - you will be prompted during installation | |
| # The values below are suggestions/defaults | |
| identity: | |
| hostname: workstation | |
| username: lrasmussen | |
| password: "$6$rounds=4096$placeholder$placeholder" | |
| realname: Lars Bo Rasmussen | |
| # SSH configuration | |
| ssh: | |
| install-server: false | |
| allow-pw: true | |
| # Package selection | |
| packages: | |
| # Development tools | |
| - build-essential | |
| - git | |
| - curl | |
| - wget | |
| - vim | |
| - neovim | |
| - tmux | |
| - htop | |
| - tree | |
| - jq | |
| - net-tools | |
| - software-properties-common | |
| - apt-transport-https | |
| - ca-certificates | |
| - gnupg | |
| - lsb-release | |
| - snapd | |
| - unzip | |
| - gpg | |
| - mtr | |
| # Shell and CLI tools | |
| - zsh | |
| - keychain | |
| - fzf | |
| - ranger | |
| - atop | |
| - vnstat | |
| # Python | |
| - python3-venv | |
| - python3-pip | |
| - pipx | |
| # Networking | |
| - wireguard-tools | |
| - nfs-common | |
| # Security | |
| - clamav | |
| - clamav-daemon | |
| - rkhunter | |
| - lynis | |
| - unattended-upgrades | |
| # Backup | |
| - borgbackup | |
| - borgbackup2 | |
| - vorta | |
| # Desktop | |
| - chromium-browser | |
| # Snap packages | |
| snaps: | |
| - name: bitwarden | |
| classic: false | |
| - name: bw | |
| classic: false | |
| # Updates and upgrades | |
| apt: | |
| preserve_sources_list: false | |
| primary: | |
| - arches: [default] | |
| uri: http://archive.ubuntu.com/ubuntu/ | |
| security: | |
| - arches: [default] | |
| uri: http://security.ubuntu.com/ubuntu/ | |
| # Late commands - run after installation | |
| late-commands: | |
| # Update package lists | |
| - curtin in-target --target=/target -- apt-get update | |
| # Create a message of the day with post-installation instructions | |
| - | | |
| curtin in-target --target=/target -- bash -c 'cat > /etc/update-motd.d/99-post-install << "EOF" | |
| #!/bin/sh | |
| cat << "MOTD" | |
| ╔═══════════════════════════════════════════════════════════════════╗ | |
| ║ Ubuntu 24.04 Installation Complete - Next Steps ║ | |
| ╚═══════════════════════════════════════════════════════════════════╝ | |
| Base system is ready! Next step: Run the bootstrap script. | |
| Run this command to set up dotfiles: | |
| bash -c "$(curl -fsSL https://xxz.dk/l/u24b)" | |
| This will: | |
| • Install GitHub CLI and Bitwarden (desktop + CLI) | |
| • Authenticate with GitHub (browser login) | |
| • Clone your private dotfiles repo | |
| • Run the full setup automatically | |
| Note: Open Bitwarden desktop app and login to access passwords! | |
| After bootstrap completes, remove this message: | |
| sudo rm /etc/update-motd.d/99-post-install | |
| MOTD | |
| EOF' | |
| - curtin in-target --target=/target -- chmod +x /etc/update-motd.d/99-post-install | |
| # Automatic reboot after installation | |
| shutdown: reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment