From ca2b58fa4d428cb4b383b77e49c850d117042ba4 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Thu, 21 May 2026 00:13:05 -0400 Subject: [PATCH] Install omarchy-installer + omarchy-settings into the live ISO Two motivations: 1. Plymouth: the omarchy plymouth theme + /etc/plymouth/plymouthd.conf ship from omarchy-settings (theme at /usr/share/plymouth/themes/omarchy, plymouthd.conf via the package's post_install etc-overrides hook). Without omarchy-settings on the live ISO, mkarchiso builds the initrd with plymouth pointing at the default theme instead of Omarchy's. Now it picks up the Omarchy theme on boot like the installed system does. 2. Drops the .pkg.tar.zst extraction hack in .automated_script.sh: OMARCHY_PATH=/usr/share/omarchy is the real package install path, so use_omarchy_helpers no longer needs to bsdtar pieces out of the offline mirror into /tmp/omarchy-iso. --- builder/build-iso.sh | 9 ++++++++- configs/airootfs/root/.automated_script.sh | 21 +++------------------ 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/builder/build-iso.sh b/builder/build-iso.sh index 1e69e41..e39f89a 100755 --- a/builder/build-iso.sh +++ b/builder/build-iso.sh @@ -60,7 +60,14 @@ mkdir -p "$build_cache_dir/airootfs/opt/packages/" cp "/tmp/$NODE_FILENAME" "$build_cache_dir/airootfs/opt/packages/" # Packages installed into the live ISO environment itself (NOT the target system). -arch_packages=(linux-t2 git gum jq openssl plymouth tzupdate omarchy-keyring lvm2 cryptsetup parted) +# omarchy-installer + omarchy-settings need to be HERE so: +# 1. /usr/share/omarchy/{install,default,bin} is available to the configurator +# and .automated_script.sh natively (no .pkg.tar.zst extraction hack) +# 2. omarchy-settings's post_install hook drops omarchy's plymouthd.conf into +# /etc/plymouth so mkinitcpio's plymouth hook picks up the Omarchy theme +# when mkarchiso builds the live initramfs (otherwise plymouth shows +# the default theme on boot). +arch_packages=(linux-t2 git gum jq openssl plymouth tzupdate omarchy-keyring omarchy-settings omarchy-installer lvm2 cryptsetup parted) printf '%s\n' "${arch_packages[@]}" >> "$build_cache_dir/packages.x86_64" # Build the offline mirror: everything pacstrap might want during the target diff --git a/configs/airootfs/root/.automated_script.sh b/configs/airootfs/root/.automated_script.sh index 5f5e5c9..78215fe 100644 --- a/configs/airootfs/root/.automated_script.sh +++ b/configs/airootfs/root/.automated_script.sh @@ -2,25 +2,10 @@ set -euo pipefail use_omarchy_helpers() { - # Neither omarchy-installer nor omarchy-settings is installed in the live - # ISO; we just have the .pkg.tar.zst files in the offline mirror. Extract - # the bits we need (install/ from the installer; logo.txt/icon.txt and - # default/ from settings) to /tmp/omarchy-iso so OMARCHY_PATH resolves to - # a tree that looks like a real install. + # omarchy-installer + omarchy-settings are installed into the live ISO (see + # build-iso.sh arch_packages), so /usr/share/omarchy is the real tree. export OMARCHY_MIRROR="$(cat /root/omarchy_mirror)" - if [[ ! -d /tmp/omarchy-iso ]]; then - local installer_pkg settings_pkg - installer_pkg=$(ls /var/cache/omarchy/mirror/offline/omarchy-installer-*.pkg.tar.zst 2>/dev/null | head -1) - settings_pkg=$(ls /var/cache/omarchy/mirror/offline/omarchy-settings-*.pkg.tar.zst 2>/dev/null | head -1) - [[ -n $installer_pkg && -n $settings_pkg ]] || { - echo "ERROR: omarchy-installer or omarchy-settings missing from offline mirror" >&2 - exit 1 - } - mkdir -p /tmp/omarchy-iso - bsdtar -xf "$installer_pkg" -C /tmp/omarchy-iso usr/share/omarchy - bsdtar -xf "$settings_pkg" -C /tmp/omarchy-iso usr/share/omarchy - fi - export OMARCHY_PATH=/tmp/omarchy-iso/usr/share/omarchy + export OMARCHY_PATH=/usr/share/omarchy export OMARCHY_INSTALL=$OMARCHY_PATH/install export OMARCHY_INSTALL_LOG_FILE=/var/log/omarchy-install.log source "$OMARCHY_INSTALL/helpers/all.sh"