diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..23bdc91 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.watcherExclude": { + "**/work/**": true + } +} \ No newline at end of file diff --git a/exports/squashfs/03-finalise/01-run.sh b/exports/squashfs/03-finalise/01-run.sh index c050176..450b961 100755 --- a/exports/squashfs/03-finalise/01-run.sh +++ b/exports/squashfs/03-finalise/01-run.sh @@ -18,10 +18,11 @@ EOF # Write live-config user settings mkdir -p "${ROOTFS_DIR}/etc/live" cat > "${ROOTFS_DIR}/etc/live/config.conf" << EOF -LIVE_USERNAME="${LIVE_USERNAME:-user}" +LIVE_USERNAME="${LIVE_USERNAME:-vesperos}" LIVE_USER_FULLNAME="${LIVE_USER_FULLNAME:-Live User}" LIVE_USER_DEFAULT_GROUPS="audio cdrom dip floppy video plugdev netdev bluetooth" -LIVE_USER_PASSWORD="${LIVE_USER_PASSWORD:-live}" +LIVE_USER_PASSWORD="${LIVE_USER_PASSWORD:-vesperos}" +LIVE_LOGIN="true" EOF # Rewrite fstab for the live environment. @@ -34,6 +35,21 @@ FSTABEOF # Remove first-boot trigger so GDM uses autologin in the live session. rm -f "${ROOTFS_DIR}/var/lib/gdm/run-initial-setup" + # Make GDM wait for live-config + mkdir -p "${ROOTFS_DIR}/etc/systemd/system/gdm.service.d" + cat > "${ROOTFS_DIR}/etc/systemd/system/gdm.service.d/override.conf" << EOF +[Unit] +After=live-config.service +EOF + + # Enable autoLogin on GDM + mkdir -p "${ROOTFS_DIR}/etc/gdm3" + cat > "${ROOTFS_DIR}/etc/gdm3/daemon.conf" << EOF +[daemon] +AutomaticLoginEnable=true +AutomaticLogin=${LIVE_USERNAME:-vesperos} +EOF + # Configure initramfs for live boot — squashfs and overlay are required if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/initramfs.conf" ]; then sed -i 's/^MODULES=.*/MODULES=most/' "${ROOTFS_DIR}/etc/initramfs-tools/initramfs.conf" @@ -43,6 +59,11 @@ FSTABEOF grep -qx "${mod}" "${ROOTFS_DIR}/etc/initramfs-tools/modules" 2>/dev/null || \ echo "${mod}" >> "${ROOTFS_DIR}/etc/initramfs-tools/modules" done + + # Enable live-config system wide, instead of via grub + on_chroot << EOF +systemctl enable live-config.service +EOF fi fi