Moved to new phase

This commit is contained in:
2026-03-20 09:45:20 +01:00
parent 31e2574e18
commit d6ea38db14
9 changed files with 521 additions and 19 deletions

View File

@@ -62,10 +62,83 @@ install_base_system() {
fi
# Create essential directories
mkdir -p "${MOUNT_POINT}"/{boot,home,mnt,opt,srv,tmp}
mkdir -p "${MOUNT_POINT}"/var/{cache,lib,log,lock,run,spool,tmp}
mkdir -p "${MOUNT_POINT}/boot"
mkdir -p "${MOUNT_POINT}/home"
mkdir -p "${MOUNT_POINT}/mnt"
mkdir -p "${MOUNT_POINT}/opt"
mkdir -p "${MOUNT_POINT}/srv"
mkdir -p "${MOUNT_POINT}/tmp"
mkdir -p "${MOUNT_POINT}/var/cache"
mkdir -p "${MOUNT_POINT}/var/lib/dpack/db"
mkdir -p "${MOUNT_POINT}/var/lib/dpack/repos"
mkdir -p "${MOUNT_POINT}/var/log"
mkdir -p "${MOUNT_POINT}/var/lock"
mkdir -p "${MOUNT_POINT}/var/run"
mkdir -p "${MOUNT_POINT}/var/spool"
mkdir -p "${MOUNT_POINT}/var/tmp"
mkdir -p "${MOUNT_POINT}/etc/rc.d"
mkdir -p "${MOUNT_POINT}/etc/sysconfig"
chmod 1777 "${MOUNT_POINT}/tmp"
# --- Deploy DarkForge configuration files ---------------------------------
# These must be copied BEFORE user setup (which modifies inittab)
info "Installing DarkForge configuration..."
# Determine where configs live — either on the live ISO or relative to installer
CONFIG_SRC=""
if [ -d "/install/configs" ]; then
CONFIG_SRC="/install/configs"
elif [ -d "${SCRIPT_DIR}/../configs" ]; then
CONFIG_SRC="$(cd "${SCRIPT_DIR}/../configs" && pwd)"
elif [ -d "${SCRIPT_DIR}/../../configs" ]; then
CONFIG_SRC="$(cd "${SCRIPT_DIR}/../../configs" && pwd)"
fi
if [ -n "$CONFIG_SRC" ]; then
# rc.d daemon scripts — critical for boot
if [ -d "${CONFIG_SRC}/rc.d" ]; then
cp -a "${CONFIG_SRC}/rc.d/"* "${MOUNT_POINT}/etc/rc.d/" 2>/dev/null || true
chmod 755 "${MOUNT_POINT}/etc/rc.d/"* 2>/dev/null || true
ok " rc.d scripts installed"
fi
# inittab — needed for auto-login (user.sh modifies it via sed)
if [ -f "${CONFIG_SRC}/inittab" ]; then
cp "${CONFIG_SRC}/inittab" "${MOUNT_POINT}/etc/inittab"
ok " inittab installed"
fi
# rc.conf (template — will be overwritten with final values at end of install)
if [ -f "${CONFIG_SRC}/rc.conf" ]; then
cp "${CONFIG_SRC}/rc.conf" "${MOUNT_POINT}/etc/rc.conf"
ok " rc.conf template installed"
fi
# fstab template
if [ -f "${CONFIG_SRC}/fstab.template" ]; then
cp "${CONFIG_SRC}/fstab.template" "${MOUNT_POINT}/etc/fstab"
fi
# dwl config.h — dwl reads this at compile time, but we also install it
# to /etc/dwl/ so dpack can find it when building dwl on the target
if [ -d "${CONFIG_SRC}/dwl" ]; then
mkdir -p "${MOUNT_POINT}/etc/dwl"
cp -a "${CONFIG_SRC}/dwl/"* "${MOUNT_POINT}/etc/dwl/" 2>/dev/null || true
ok " dwl config installed"
fi
# zprofile — user shell profile that auto-starts the Wayland session
if [ -f "${CONFIG_SRC}/zprofile" ]; then
# Will be copied to the user's home directory by user.sh
mkdir -p "${MOUNT_POINT}/etc/skel"
cp "${CONFIG_SRC}/zprofile" "${MOUNT_POINT}/etc/skel/.zprofile"
ok " zprofile template installed to /etc/skel"
fi
else
warn "Config source not found — rc.d scripts, inittab may be missing"
warn "System may not boot correctly without these files"
fi
ok "Base system installed"
}
@@ -171,7 +244,7 @@ KEYMAP="${INSTALL_KEYMAP:-us}"
LOCALE="${INSTALL_LOCALE:-en_US.UTF-8}"
FONT="ter-v18n"
DAEMONS=(eudev syslog dbus dhcpcd pipewire)
DAEMONS=(eudev seatd syslog dbus dhcpcd pipewire)
MODULES=(nvidia nvidia-modeset nvidia-drm nvidia-uvm)

View File

@@ -37,11 +37,24 @@ setup_users() {
info "Set password for '${INSTALL_USERNAME}':"
chroot "${MOUNT_POINT}" /bin/bash -c "passwd '${INSTALL_USERNAME}'"
# Install user shell profile
# Install user shell profile (auto-starts Wayland session on tty1)
local zprofile_src=""
if [ -f "/install/configs/zprofile" ]; then
cp "/install/configs/zprofile" "${MOUNT_POINT}/home/${INSTALL_USERNAME}/.zprofile"
chroot "${MOUNT_POINT}" chown "${INSTALL_USERNAME}:${INSTALL_USERNAME}" "/home/${INSTALL_USERNAME}/.zprofile"
zprofile_src="/install/configs/zprofile"
elif [ -f "${MOUNT_POINT}/etc/skel/.zprofile" ]; then
zprofile_src="${MOUNT_POINT}/etc/skel/.zprofile"
fi
if [ -n "${zprofile_src}" ]; then
cp "${zprofile_src}" "${MOUNT_POINT}/home/${INSTALL_USERNAME}/.zprofile"
chroot "${MOUNT_POINT}" chown "${INSTALL_USERNAME}:${INSTALL_USERNAME}" "/home/${INSTALL_USERNAME}/.zprofile"
ok " Installed .zprofile for ${INSTALL_USERNAME}"
else
warn " zprofile not found — user will need to start dwl manually"
fi
# Create Screenshots directory for grim keybinding
mkdir -p "${MOUNT_POINT}/home/${INSTALL_USERNAME}/Screenshots"
chroot "${MOUNT_POINT}" chown "${INSTALL_USERNAME}:${INSTALL_USERNAME}" "/home/${INSTALL_USERNAME}/Screenshots"
# Update inittab with the correct username for auto-login
sed -i "s/--autologin danny/--autologin ${INSTALL_USERNAME}/" \