Simplify OMARCHY_INSTALL_MODE to online/offline only

Drop online-git: the new world has a single package-backed install path
that's either online (pacman pulls from omacom-pkgs.org) or offline (ISO
chroot pulls from the bundled mirror). The git-clone-and-run-installer
path is gone — boot.sh becomes a thin bootstrap that installs the
omarchy-installer package and invokes its installer.

- install/helpers/mode.sh: two modes, validation message updated. Default
  fallback is 'online' (the boot.sh path); OMARCHY_CHROOT_INSTALL=1 still
  shims to offline, OMARCHY_ONLINE_INSTALL=true still shims to online.
- install/preflight/all.sh: first-run-mode + disable-mkinitcpio gated on
  offline (offline is the from-scratch chroot path; online runs on an
  existing system).
- install/preflight/pacman.sh: DELETED. boot.sh now handles repo config
  before install.sh runs.
- install/packaging/all.sh: drop base.sh entirely. Both modes have
  base packages installed via omarchy-installer's depends before
  install.sh runs. base.sh remains on disk in case the ISO mirror build
  flow wants to invoke it directly.
- install/helpers/chroot.sh, errors.sh, post-install/finished.sh,
  config/mise-work.sh: rename mode checks to use online/offline.
This commit is contained in:
Ryan Hughes
2026-06-04 18:34:35 -04:00
parent 81e81fe0c8
commit 7fffc5f3c4
8 changed files with 24 additions and 58 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
# In iso-chroot mode systemd isn't running, so skip --now and just enable.
# In offline (ISO chroot) mode systemd isn't running, so skip --now.
chrootable_systemctl_enable() {
if install_mode_is iso-chroot; then
if install_mode_is offline; then
sudo systemctl enable $1
else
sudo systemctl enable --now $1
+1 -2
View File
@@ -104,8 +104,7 @@ catch_errors() {
while true; do
options=()
# Retry only makes sense for online flows (git clone or package install).
if install_mode_is online-git || install_mode_is online-package; then
if install_mode_is online; then
options+=("Retry installation")
fi
+15 -18
View File
@@ -1,14 +1,18 @@
# OMARCHY_INSTALL_MODE is one of: iso-chroot, online-package, online-git
# Back-compat shims honor the older OMARCHY_CHROOT_INSTALL and
# OMARCHY_ONLINE_INSTALL flags during transition.
# OMARCHY_INSTALL_MODE is one of: online, offline
# online - bootstrap installed omarchy-* packages from the omacom-pkgs.org
# repo on an existing Arch system, then ran install.sh.
# offline - ISO build: archinstall pacstrapped the bundled mirror; install.sh
# runs in the chroot before the user's first boot.
# Legacy OMARCHY_CHROOT_INSTALL and OMARCHY_ONLINE_INSTALL still work as
# shims during transition.
detect_install_mode() {
if [[ -n ${OMARCHY_INSTALL_MODE:-} ]]; then
case $OMARCHY_INSTALL_MODE in
iso-chroot|online-package|online-git) ;;
online|offline) ;;
*)
echo "Error: invalid OMARCHY_INSTALL_MODE=$OMARCHY_INSTALL_MODE" >&2
echo " must be one of: iso-chroot, online-package, online-git" >&2
echo " must be one of: online, offline" >&2
exit 1
;;
esac
@@ -17,13 +21,11 @@ detect_install_mode() {
fi
if [[ -n ${OMARCHY_CHROOT_INSTALL:-} ]]; then
export OMARCHY_INSTALL_MODE=iso-chroot
export OMARCHY_INSTALL_MODE=offline
elif [[ -n ${OMARCHY_ONLINE_INSTALL:-} ]]; then
export OMARCHY_INSTALL_MODE=online-git
elif [[ ${OMARCHY_PATH:-} == /usr/share/omarchy ]]; then
export OMARCHY_INSTALL_MODE=online-package
export OMARCHY_INSTALL_MODE=online
else
export OMARCHY_INSTALL_MODE=online-git
export OMARCHY_INSTALL_MODE=online
fi
}
@@ -32,22 +34,17 @@ install_mode_is() {
}
# Synchronize the legacy vars to the canonical mode so callers that still
# check OMARCHY_CHROOT_INSTALL / OMARCHY_ONLINE_INSTALL agree with us
# (including unsetting contradictory ones).
# check OMARCHY_CHROOT_INSTALL / OMARCHY_ONLINE_INSTALL agree with us.
export_legacy_mode_flags() {
case ${OMARCHY_INSTALL_MODE:-} in
iso-chroot)
offline)
export OMARCHY_CHROOT_INSTALL=1
unset OMARCHY_ONLINE_INSTALL
;;
online-git)
online)
export OMARCHY_ONLINE_INSTALL=true
unset OMARCHY_CHROOT_INSTALL
;;
online-package)
unset OMARCHY_CHROOT_INSTALL
unset OMARCHY_ONLINE_INSTALL
;;
esac
}