WireGuard-Config ins ISO einbetten (wireguard/ Ordner, .gitignore)

- build-iso.sh erkennt Modell/Hostname aus user-data und sucht
  passende Config in wireguard/{hostname}.conf oder wireguard/m{model}.conf
- user-data: late-commands kopieren wg0.conf vom Installationsmedium
  nach /etc/wireguard/ und aktivieren wg-quick@wg0
- wireguard/ in .gitignore (keine Secrets im Repo)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rene 2026-03-08 19:29:59 +01:00
parent 1ce585cd94
commit ef7c660c82
3 changed files with 40 additions and 5 deletions

View file

@ -6,7 +6,7 @@ autoinstall:
layout: de
variant: mac
identity:
hostname: macbook
hostname: m16
username: rene
password: "$6$lXt4c5wub9FgGOj2$rjwW.UjraH2yYwxabXH.diOu86KSfW.AZvIVRmScbH7Nmh.zLbeMbNITGtRKfpGhe01nqgw4fL8QK67B1oWaq."
ssh:
@ -17,8 +17,12 @@ autoinstall:
late-commands:
# User rene zur sudo-Gruppe hinzufuegen
- curtin in-target --target=/target -- usermod -aG sudo rene
# WireGuard-Config vom Installationsmedium kopieren (falls vorhanden)
- bash -c 'if [ -f /cdrom/autoinstall/wg0.conf ]; then mkdir -p /target/etc/wireguard && cp /cdrom/autoinstall/wg0.conf /target/etc/wireguard/wg0.conf && chmod 600 /target/etc/wireguard/wg0.conf; fi'
# WireGuard beim Boot aktivieren
- curtin in-target --target=/target -- bash -c 'if [ -f /etc/wireguard/wg0.conf ]; then systemctl enable wg-quick@wg0; fi'
# System-Setup in chroot (Pakete, Configs, Locale, Services)
- curtin in-target --target=/target -- bash -c 'curl -fsSL https://git.motocamp.de/rene/macbook-setup/raw/branch/main/setup-base.sh | bash -s -- 13'
- curtin in-target --target=/target -- bash -c 'curl -fsSL https://git.motocamp.de/rene/macbook-setup/raw/branch/main/setup-base.sh | bash -s -- 16'
# Desktop-Setup als Firstboot-Autostart einrichten
- curtin in-target --target=/target -- mkdir -p /home/rene/.config/autostart
- curtin in-target --target=/target -- bash -c 'cat > /home/rene/.config/autostart/macbook-setup-desktop.desktop <<AUTOSTART