Chunk 1 of the C3 refactor: replace the two-pass install model (archinstall CLI + custom shell dance + chroot bash installer) with a single Python orchestrator that owns phase ordering, using archinstall as a library subsystem. Splits the bash entry point into two: - install.sh: online entry point. Ensures omarchy runtime + base.packages are installed/up to date, then exec's finalize.sh. - finalize.sh: the in-target portion (preflight + packaging + config + login + post-install). Called by install.sh (online) AND by the orchestrator after arch-chroot -u $USER (offline). Adds the orchestrator skeleton under install/orchestrator/: - main.py: entry point, builds + runs the phase list - context.py: InstallContext (parsed configurator JSON + invocation paths) - phases.py: phase state machine (logging + state.json + error wrapping) - phases_impl.py: stubbed phase implementations (filled in by chunks 2-6) - archinstall_adapter.py: thin compat wall around archinstall lib imports (only this module imports from archinstall.*) - ui.py: gum subprocess wrappers so the orchestrator keeps the same styled-terminal UX as the bash installer Updates bin/omarchy-install to dispatch: - --config <json> in args → python -m orchestrator.main (ISO install) - anything else → bash install.sh (online rerun on installed system) Concrete phase logic lands in subsequent chunks. All phases currently raise NotImplementedError; the orchestrator imports cleanly and --help works as a smoke check.
34 lines
1.2 KiB
Bash
34 lines
1.2 KiB
Bash
#!/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.
|
|
|
|
set -eEo pipefail
|
|
|
|
_OMARCHY_INSTALLER_DIR=$(dirname "$(realpath "${BASH_SOURCE[0]}")")
|
|
export OMARCHY_PATH="${OMARCHY_PATH:-$_OMARCHY_INSTALLER_DIR}"
|
|
export OMARCHY_INSTALL="$OMARCHY_PATH/install"
|
|
export OMARCHY_INSTALL_LOG_FILE="${OMARCHY_INSTALL_LOG_FILE:-/var/log/omarchy-install.log}"
|
|
export PATH="$OMARCHY_PATH/bin:$PATH"
|
|
|
|
source "$OMARCHY_INSTALL/helpers/mode.sh"
|
|
detect_install_mode
|
|
export_legacy_mode_flags
|
|
|
|
source "$OMARCHY_INSTALL/helpers/all.sh"
|
|
|
|
source "$OMARCHY_INSTALL/preflight/all.sh"
|
|
source "$OMARCHY_INSTALL/packaging/all.sh"
|
|
source "$OMARCHY_INSTALL/config/all.sh"
|
|
source "$OMARCHY_INSTALL/login/all.sh"
|
|
source "$OMARCHY_INSTALL/post-install/all.sh"
|