# Yino preseed configuration for Debian 13 (Trixie) # Fully unattended install with hardcoded test credentials. # TODO: For production, remove hardcoded passwords and prompt interactively. # Locale and keyboard d-i debian-installer/locale string en_US.UTF-8 d-i keyboard-configuration/xkb-keymap select us # Network — DHCP (needed to pull Hyprland from sid) d-i netcfg/enable boolean true d-i netcfg/choose_interface select auto d-i netcfg/get_hostname string yino d-i netcfg/get_domain string local d-i netcfg/hostname string yino # Mirror — Debian archive (needed for Hyprland from sid) d-i apt-setup/use_mirror boolean true d-i mirror/country string manual d-i mirror/http/hostname string deb.debian.org d-i mirror/http/directory string /debian d-i mirror/http/proxy string # Clock d-i clock-setup/utc boolean true d-i time/zone string UTC # LUKS encryption passphrase (hardcoded for dev/test) d-i partman-crypto/passphrase string yinoyino d-i partman-crypto/passphrase-again string yinoyino d-i partman-crypto/weak_passphrase boolean true # Partitioning — encrypted LVM with btrfs root d-i partman-auto/method string crypto d-i partman-lvm/device_remove_lvm boolean true d-i partman-md/device_remove_md boolean true d-i partman-lvm/confirm boolean true d-i partman-lvm/confirm_nooverwrite boolean true d-i partman-auto-lvm/guided_size string max d-i partman-auto-crypto/erase_disks boolean false d-i partman/default_filesystem string btrfs d-i partman-auto/choose_recipe select atomic 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 # User account (hardcoded for dev/test) d-i passwd/root-login boolean false d-i passwd/user-fullname string Yino User d-i passwd/username string yino d-i passwd/user-password string yinoyino d-i passwd/user-password-again string yinoyino d-i user-setup/allow-password-weak boolean true # Packages — minimal base + essentials tasksel tasksel/first multiselect standard d-i pkgsel/include string sudo btrfs-progs # Don't eject CD (fails in QEMU, causes prompt loop) d-i cdrom-detect/eject boolean false # Skip upgrade check (offline install, nothing to upgrade) d-i pkgsel/upgrade select none # No security/updates services (offline) d-i apt-setup/services-select multiselect # No popularity contest popularity-contest popularity-contest/participate boolean false # GRUB d-i grub-installer/only_debian boolean true d-i grub-installer/bootdev string default # Skip additional media scan 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 # Skip media integrity check (blocks unattended install) d-i cdrom-checker/start boolean false # Finish d-i finish-install/reboot_in_progress note # Post-install: configure serial console, SDDM + UWSM + Hyprland desktop d-i preseed/late_command string \ USER=$(grep ':x:1000:' /target/etc/passwd | cut -d: -f1); \ LOG=/target/var/log/yino-late-command.log; \ echo "=== Yino late_command start ===" > $LOG; \ echo "USER=$USER" >> $LOG; \ echo "--- GRUB serial console ---" >> $LOG; \ sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="quiet"/' /target/etc/default/grub; \ sed -i 's/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX="console=ttyS0,115200n8 console=tty0"/' /target/etc/default/grub; \ echo 'GRUB_TERMINAL="serial console"' >> /target/etc/default/grub; \ echo 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >> /target/etc/default/grub; \ in-target update-grub >> $LOG 2>&1; \ echo "--- DNS setup ---" >> $LOG; \ echo "nameserver 1.1.1.1" > /target/etc/resolv.conf; \ echo "--- sid repo ---" >> $LOG; \ echo 'deb http://deb.debian.org/debian sid main contrib non-free-firmware' > /target/etc/apt/sources.list.d/sid.list; \ printf 'Package: *\nPin: release a=unstable\nPin-Priority: 100\n' > /target/etc/apt/preferences.d/sid-low-priority; \ echo "--- apt-get update ---" >> $LOG; \ in-target apt-get update >> $LOG 2>&1 || echo "FAILED: apt-get update (exit $?)" >> $LOG; \ echo "--- install sddm ---" >> $LOG; \ in-target env DEBIAN_FRONTEND=noninteractive apt-get -y install sddm >> $LOG 2>&1 || echo "FAILED: install sddm (exit $?)" >> $LOG; \ echo "--- install hyprland uwsm foot ---" >> $LOG; \ in-target env DEBIAN_FRONTEND=noninteractive apt-get -y -t unstable install hyprland uwsm foot >> $LOG 2>&1 || echo "FAILED: install hyprland (exit $?)" >> $LOG; \ echo "--- SDDM config ---" >> $LOG; \ mkdir -p /target/etc/sddm.conf.d; \ printf '[Autologin]\nUser=%s\nSession=hyprland-uwsm\n\n[Theme]\nCurrent=breeze\n' "$USER" > /target/etc/sddm.conf.d/autologin.conf; \ in-target systemctl enable sddm >> $LOG 2>&1 || echo "FAILED: enable sddm" >> $LOG; \ mkdir -p /target/usr/share/wayland-sessions; \ printf '[Desktop Entry]\nName=Hyprland (UWSM)\nComment=Hyprland via Universal Wayland Session Manager\nExec=uwsm start hyprland.desktop\nType=Application\nDesktopNames=Hyprland\n' > /target/usr/share/wayland-sessions/hyprland-uwsm.desktop; \ echo "--- Hyprland config ---" >> $LOG; \ UHOME=/target/home/$USER; \ mkdir -p $UHOME/.config/hyprland; \ printf 'monitor = ,preferred,auto,1\n\nenv = WLR_NO_HARDWARE_CURSORS,1\nenv = WLR_RENDERER_ALLOW_SOFTWARE,1\n\nexec-once = foot --server\n\n$mainMod = SUPER\n\nbind = $mainMod, Return, exec, foot\nbind = $mainMod SHIFT, Q, killactive\nbind = $mainMod SHIFT, E, exit\n\nbind = $mainMod, 1, workspace, 1\nbind = $mainMod, 2, workspace, 2\nbind = $mainMod, 3, workspace, 3\nbind = $mainMod, 4, workspace, 4\nbind = $mainMod, 5, workspace, 5\n\nbind = $mainMod, left, movefocus, l\nbind = $mainMod, right, movefocus, r\nbind = $mainMod, up, movefocus, u\nbind = $mainMod, down, movefocus, d\n' > $UHOME/.config/hyprland/hyprland.conf; \ chown -R 1000:1000 $UHOME/.config; \ echo "=== Yino late_command done ===" >> $LOG