Wire archinstall adapter + concrete phase implementations

Chunks 2-6 of the C3 refactor. With the adapter in place, the phase
list collapses from 12 stubs to 5 real phases:

  prepare_live          parse user_*.json into archinstall handlers
  arch_install          partition + base + bootloader + limine config +
                        early omarchy + useradd + runtime omarchy (all
                        inside a single Installer context manager)
  run_chroot_finalizer  arch-chroot -u $user → finalize.sh
  validate_boot         halt if /boot/limine.conf, /etc/kernel/cmdline,
                        or UKI are missing/malformed
  finish                reboot prompt

Key reordering vs upstream guided.py: write_limine_config runs BETWEEN
add_bootloader and the first add_additional_packages call. By the time
omarchy-limine pulls limine-mkinitcpio-hook (in the runtime package
install), /etc/default/limine and /etc/kernel/cmdline are in place, so
the UKI is built correctly on the first try — no stale-UKI purge,
no follow-up limine-update.

add_additional_packages is split into two calls so /etc/skel is
populated (via omarchy-settings in EARLY_PACKAGES) BEFORE useradd:

  EARLY_PACKAGES = base-devel git omarchy-keyring omarchy-settings omarchy-installer
  → installer.create_users(users)
  → runtime: omarchy + omarchy-base.packages

archinstall_adapter.py is the ONLY module that imports from archinstall.
If archinstall's API churns, the blast radius is contained here. Tested
against archinstall 4.3 / Python 3.14.

Limine template lookup tries the new install/assets/limine/ path first
and falls back to the legacy default/limine/ location during the
template-ownership migration (lands in a follow-up chunk).
This commit is contained in:
Ryan Hughes committed 2026-06-04 18:34:35 -04:00
1 parent df645a202d
commit c6ccd62550
4 files changed
+342 -72

No files matched your search

+6 -20
View File
@@ -33,32 +33,18 @@ def build_phases():
"""
from .phases_impl import (
prepare_live,
cleanup_disk,
partition_and_mount,
install_base,
install_bootloader,
write_limine_config,
install_early_omarchy_packages,
create_user,
install_omarchy_runtime,
arch_install,
run_chroot_finalizer,
validate_boot,
finish,
)
return [
("Preparing live environment", prepare_live),
("Cleaning install disk", cleanup_disk),
("Partitioning + mounting", partition_and_mount),
("Installing base system", install_base),
("Installing bootloader", install_bootloader),
("Writing Limine config", write_limine_config),
("Installing Omarchy keyring + settings", install_early_omarchy_packages),
("Creating user", create_user),
("Installing Omarchy runtime", install_omarchy_runtime),
("Finalizing in chroot", run_chroot_finalizer),
("Validating boot setup", validate_boot),
("Finishing", finish),
("Preparing live environment", prepare_live),
("Installing Arch + Omarchy", arch_install),
("Finalizing in chroot", run_chroot_finalizer),
("Validating boot setup", validate_boot),
("Finishing", finish),
]