diff --git a/distros/debian/13/amd64.pkrvars.hcl b/distros/debian/13/amd64.pkrvars.hcl new file mode 100644 index 0000000..b71f285 --- /dev/null +++ b/distros/debian/13/amd64.pkrvars.hcl @@ -0,0 +1,22 @@ +distro = "debian" +version = "13" +iso = { + url = "https://cdimage.debian.org/cdimage/release/13.0.0/amd64/iso-cd/debian-13.0.0-amd64-netinst.iso" + checksum = "e363cae0f1f22ed73363d0bde50b4ca582cb2816185cf6eac28e93d9bb9e1504" +} +boot_command = [ + "e", + "auto ", + "preseed/url=http://{{.HTTPIP}}:{{ .HTTPPort }}/preseed.cfg ", + "ipv6.disable=1 ", + "debian-installer=en_US locale=en_US kbd-chooser/method=us ", + "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", + "keyboard-configuration/variant=USA console-setup/ask_detect=false ", + "keyboard-configuration/xkb-keymap=us ", + "debconf/frontend=noninteractive ", + "hostname={{.Name}} ", + "domain=vagrant ", + "" +] +http_directory = "distros/debian/13/http/" +vbox_os_type = "Debian13_64" diff --git a/distros/debian/13/finalize.sh b/distros/debian/13/finalize.sh new file mode 100644 index 0000000..9da84aa --- /dev/null +++ b/distros/debian/13/finalize.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -ex + +# 5 minute timeout for the package lock to arrive +apt-get -o DPkg::Lock::Timeout=600 autoremove -y + +# Configure sshd to be faster +cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf +UseDNS no +PubkeyAcceptedKeyTypes +ssh-rsa +EOF + +# Clean up after ourselves +apt-get clean + +virt="$(systemd-detect-virt)" +if [ "${virt}" == "microsoft" ]; then + apt-get install -y hyperv-daemons + systemctl enable hv-fcopy-daemon + systemctl enable hv-kvp-daemon + systemctl enable hv-vss-daemon +fi diff --git a/distros/debian/13/http/preseed.cfg b/distros/debian/13/http/preseed.cfg new file mode 100644 index 0000000..f5d69e1 --- /dev/null +++ b/distros/debian/13/http/preseed.cfg @@ -0,0 +1,65 @@ +d-i debian-installer/locale string en_US +d-i keyboard-configuration/xkb-keymap select us + +d-i passwd/root-password-again password vagrant +d-i passwd/root-password password vagrant +d-i passwd/user-fullname string vagrant +d-i passwd/username string vagrant +d-i passwd/user-password password vagrant +d-i passwd/user-password-again password vagrant + +d-i time/zone string UTC + +d-i partman-auto/method string regular +d-i partman-auto/expert_recipe string \ + scheme :: \ + 512 50 512 fat32 \ + $primary{ } \ + $bootable{ } \ + method{ efi } \ + format{ } \ + mountpoint{ /boot/efi } . \ + 200% 0 200% linux-swap \ + $primary{ } \ + method{ swap } \ + format{ } . \ + 1 0 -1 ext4 \ + $primary{ } \ + method{ format } \ + format{ } \ + use_filesystem{ } \ + filesystem{ ext4 } \ + mountpoint{ / } . +d-i partman-partitioning/confirm_write_new_label boolean true +d-i partman/choose_partition select finish +d-i partman/confirm boolean true +d-i partman/confirm_nooverwrite boolean true + +# Settings for package manager +d-i apt-setup/non-free boolean true +d-i apt-setup/contrib boolean true +d-i apt-setup/cdrom/set-first boolean false +d-i apt-setup/cdrom/set-next boolean false +d-i apt-setup/cdrom/set-failed boolean false +d-i mirror/country string manual +d-i mirror/http/hostname string httpredir.debian.org +d-i mirror/http/directory string /debian +d-i mirror/http/proxy string + +# Package selection +tasksel tasksel/first multiselect +d-i pkgsel/include string curl openssh-server sudo python3 network-manager +popularity-contest popularity-contest/participate boolean false + +d-i grub-installer/bootdev string default +d-i grub-installer/force-efi-extra-removable boolean true + +d-i finish-install/reboot_in_progress note + +d-i preseed/late_command string \ + echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant; \ + echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \ + chmod 440 /target/etc/sudoers.d/vagrant; \ + sed -i -e 's/ens3/ens5/g' /target/etc/network/interfaces; \ + in-target apt-get update; \ + in-target apt-get upgrade -y diff --git a/distros/debian/13/qemu.sh b/distros/debian/13/qemu.sh new file mode 100644 index 0000000..4ef2dee --- /dev/null +++ b/distros/debian/13/qemu.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -ex + +apt install -y qemu-guest-agent +systemctl start qemu-guest-agent +systemctl enable qemu-guest-agent diff --git a/distros/debian/13/virtualbox.sh b/distros/debian/13/virtualbox.sh new file mode 100644 index 0000000..998449c --- /dev/null +++ b/distros/debian/13/virtualbox.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +set -ex + +packages=(bzip2 dkms build-essential "linux-headers-$(uname -r)") +apt install -y "${packages[@]}" +mount -t auto /home/vagrant/VBoxGuestAdditions.iso /mnt +/mnt/VBoxLinuxAdditions.run install 2>&1 | tee /root/vbox_addon_install.log +apt remove -y "${packages[@]}" +umount /mnt +rm /home/vagrant/VBoxGuestAdditions.iso diff --git a/distros/debian/13/vmware.sh b/distros/debian/13/vmware.sh new file mode 100644 index 0000000..9560300 --- /dev/null +++ b/distros/debian/13/vmware.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -ex + +apt install -y open-vm-tools diff --git a/distros/debian/default.nix b/distros/debian/default.nix index faa6d88..5bbc53f 100644 --- a/distros/debian/default.nix +++ b/distros/debian/default.nix @@ -22,4 +22,9 @@ "virtualbox-iso" ]; } + { + version = "13"; + arch = "amd64"; + eol = false; + } ]