feat: multi environnemnt desktop

[180][WIP]
This commit is contained in:
2026-05-27 16:02:05 +02:00
parent d5e0069889
commit a9d4b9ac91
12 changed files with 243 additions and 14 deletions
@@ -8,14 +8,13 @@ dontChroot: true
script:
# Copie le kernel depuis l'ISO vers /boot du système cible
- 'cp "$(find /run/archiso/bootmnt -name vmlinuz-linux 2>/dev/null | head -1)" "${ROOT}/boot/vmlinuz-linux"'
# Configure LightDM pour démarrer automatiquement la session XFCE du premier utilisateur créé.
- 'FIRST_USER="$(awk -F: ''$$3 >= 1000 && $$1 != "nobody" { print $$1; exit }'' "${ROOT}/etc/passwd")"'
- 'if [ -n "$$FIRST_USER" ]; then mkdir -p "${ROOT}/etc/lightdm/lightdm.conf.d"; printf ''[Seat:*]\nautologin-user=%s\nautologin-user-timeout=0\nuser-session=xfce\nautologin-session=xfce\ngreeter-hide-users=true\nallow-guest=false\n'' "$$FIRST_USER" > "${ROOT}/etc/lightdm/lightdm.conf.d/50-fws.conf"; fi'
- 'if [ -n "$$FIRST_USER" ] && [ -d "${ROOT}/home/$$FIRST_USER" ]; then printf ''[Desktop]\nSession=xfce\n'' > "${ROOT}/home/$$FIRST_USER/.dmrc"; fi'
- 'DESKTOP="$(cat /run/fws-desktop 2>/dev/null || printf xfce)"'
- 'if [ -z "$DESKTOP" ]; then DESKTOP="xfce"; fi'
- 'if [ ! -f "${ROOT}/usr/local/bin/fws-desktop-init-$DESKTOP" ]; then echo "Script bureau introuvable: $DESKTOP" >&2; exit 1; fi'
- 'chroot "${ROOT}" /bin/bash "/usr/local/bin/fws-desktop-init-$DESKTOP"'
# Supprime le drop-in archiso (surcharge HOOKS avec des hooks inexistants post-install)
- '-rm -f "${ROOT}/etc/mkinitcpio.conf.d/archiso.conf"'
- 'rm -f "${ROOT}/etc/mkinitcpio.conf.d/archiso.conf"'
# Remplace le linux.preset archiso par le preset standard (default + fallback)
# \x27 = ' et \x22 = " pour éviter les conflits de quotes dans YAML/bash