Simplify finalize.sh and install.sh's preflight ownership

finalize.sh just does the in-target work: env setup, source helpers,
mark current migrations as done (idempotent), run packaging/config/
login/post-install. No preflight orchestration, no install_mode_is
offline branches.

install.sh (online) inlines the preflight bits that are online-specific:
guard.sh, begin.sh, show-env.sh. The first-run-mode setup that used to
live in preflight (offline-only) moves to an orchestrator phase in a
later chunk; disable-mkinitcpio.sh is obsolete entirely because the C3
phase ordering means the limine UKI hook fires exactly once with
correct config in place.

install/preflight/{all,disable-mkinitcpio,first-run-mode}.sh still
exist on disk but are no longer sourced. They'll get removed in a
later chunk once the orchestrator absorbs first-run-mode.
This commit is contained in:
Ryan Hughes
2026-06-04 18:34:35 -04:00
parent 2beda6abed
commit df645a202d
2 changed files with 27 additions and 28 deletions
+12 -12
View File
@@ -1,16 +1,10 @@
#!/bin/bash
#
# The in-target portion of an Omarchy install: preflight checks, package-level
# setup, system configuration, login wiring, post-install steps. Run AFTER the
# orchestrator (offline mode) or install.sh (online mode) has ensured the
# omarchy runtime + omarchy-base.packages set is already installed.
#
# Called by:
# - install.sh (online mode, after pacman -Syu)
# - orchestrator/main.py (offline mode, via arch-chroot -u $USER)
#
# Anything that *must* happen as root pre-user lives in the orchestrator; this
# script runs as the install user.
# The in-target portion of an Omarchy install: package-level setup, system
# configuration, login wiring, post-install. Self-contained — works whether
# invoked by install.sh (online) or by the Python orchestrator (offline, via
# arch-chroot). The caller is responsible for system sanity checks (guards),
# UI styling, and log capture.
set -eEo pipefail
@@ -26,7 +20,13 @@ export_legacy_mode_flags
source "$OMARCHY_INSTALL/helpers/all.sh"
source "$OMARCHY_INSTALL/preflight/all.sh"
# Mark every shipped migration as "done" so future updates only run the new
# ones. Idempotent; safe to re-run.
mkdir -p ~/.local/state/omarchy/migrations
for _f in "$OMARCHY_PATH/migrations"/*.sh; do
[[ -f $_f ]] && touch ~/.local/state/omarchy/migrations/"$(basename "$_f")"
done
source "$OMARCHY_INSTALL/packaging/all.sh"
source "$OMARCHY_INSTALL/config/all.sh"
source "$OMARCHY_INSTALL/login/all.sh"