Make setup ISO-only

Remove legacy online installer entrypoints, collapse migrations for 4.0, and move setup responsibilities into target-side system, hardware, and user commands.
This commit is contained in:
Ryan Hughes
2026-06-04 18:37:32 -04:00
parent b45e8464ef
commit 75cb4f7195
440 changed files with 790 additions and 4922 deletions
-2
View File
@@ -1,2 +0,0 @@
source $OMARCHY_INSTALL/post-install/system.sh
source $OMARCHY_INSTALL/post-install/finished.sh
-11
View File
@@ -1,11 +0,0 @@
# Allow passwordless reboot for the online installer - removed in first-run
install_user="${OMARCHY_INSTALL_USER:-${USER:-}}"
[[ -n $install_user ]] || exit 0
mkdir -p /etc/sudoers.d
cat > /etc/sudoers.d/99-omarchy-installer-reboot <<EOF
Cmnd_Alias INSTALLER_REBOOT_CLEANUP = /usr/bin/rm -f /etc/sudoers.d/99-omarchy-installer-reboot, /bin/rm -f /etc/sudoers.d/99-omarchy-installer-reboot
$install_user ALL=(ALL) NOPASSWD: /usr/bin/reboot
$install_user ALL=(ALL) NOPASSWD: INSTALLER_REBOOT_CLEANUP
EOF
chmod 440 /etc/sudoers.d/99-omarchy-installer-reboot
+5
View File
@@ -0,0 +1,5 @@
# https://wiki.archlinux.org/title/Systemd-resolved
# The target does not need the stub file to exist yet; systemd-resolved creates
# it at boot.
echo "Symlinking resolved stub-resolv to /etc/resolv.conf"
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
-44
View File
@@ -1,44 +0,0 @@
stop_install_log
# Offline ISO installs run inside arch-chroot while the live ISO orchestrator
# owns the visible UI. Never prompt from here: stdout/stderr may be captured to
# logs, leaving gum waiting invisibly on /dev/tty. The live orchestrator shows
# the final "installed in ... / reboot" screen after validation.
if install_mode_is offline; then
# Never risk an interactive sudo prompt in the chrooted ISO route. The
# orchestrator removes this shim after finalize.sh returns.
touch /var/tmp/omarchy-install-completed
return 0 2>/dev/null || exit 0
fi
echo_in_style() {
echo "$1" | tte --canvas-width 0 --anchor-text c --frame-rate 640 print
}
clear
echo
tte -i $OMARCHY_PATH/logo.txt --canvas-width 0 --anchor-text c --frame-rate 920 laseretch
echo
# Display installation time if available
if [[ -f $OMARCHY_INSTALL_LOG_FILE ]] && grep -q "Total:" "$OMARCHY_INSTALL_LOG_FILE" 2>/dev/null; then
echo
TOTAL_TIME=$(tail -n 20 "$OMARCHY_INSTALL_LOG_FILE" | grep "^Total:" | sed 's/^Total:[[:space:]]*//')
if [[ -n $TOTAL_TIME ]]; then
echo_in_style "Installed in $TOTAL_TIME"
fi
else
echo_in_style "Finished installing"
fi
if sudo test -f /etc/sudoers.d/99-omarchy-installer; then
sudo rm -f /etc/sudoers.d/99-omarchy-installer &>/dev/null
fi
# Exit gracefully if user chooses not to reboot
if gum confirm --padding "0 0 0 $((PADDING_LEFT + 32))" --show-help=false --default --affirmative "Reboot Now" --negative "" ""; then
# Clear screen to hide any shutdown messages
clear
sudo reboot 2>/dev/null
fi
-18
View File
@@ -1,18 +0,0 @@
# Setup sudo-less access for the privileged first-run system one-shot. The
# install user's ~/.local/state/omarchy/first-run.mode marker is created by
# finalize.sh while running as that user.
install_user="$OMARCHY_INSTALL_USER"
install_mode_is offline || exit 0
mkdir -p /etc/sudoers.d
cat > /etc/sudoers.d/first-run <<EOF
Cmnd_Alias FIRST_RUN_CLEANUP = /usr/bin/rm -f /etc/sudoers.d/first-run, /bin/rm -f /etc/sudoers.d/first-run
Cmnd_Alias SYMLINK_RESOLVED = /usr/bin/ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
$install_user ALL=(ALL) NOPASSWD: /usr/bin/systemctl
$install_user ALL=(ALL) NOPASSWD: /usr/bin/ufw
$install_user ALL=(ALL) NOPASSWD: /usr/bin/ufw-docker
$install_user ALL=(ALL) NOPASSWD: /usr/bin/gtk-update-icon-cache
$install_user ALL=(ALL) NOPASSWD: SYMLINK_RESOLVED
$install_user ALL=(ALL) NOPASSWD: FIRST_RUN_CLEANUP
EOF
chmod 440 /etc/sudoers.d/first-run
-5
View File
@@ -1,5 +0,0 @@
# Remove legacy paths replaced by package-owned Omarchy defaults.
rm -f /etc/udev/rules.d/99-power-profile.rules
rm -f /etc/udev/rules.d/99-wifi-powersave.rules
rm -f /etc/systemd/system.conf.d/99-omarchy-nofile.conf
rm -f /etc/systemd/user.conf.d/99-omarchy-nofile.conf
+1 -8
View File
@@ -10,11 +10,4 @@ if [[ -f $OMARCHY_PATH/etc-overrides/cups-cups-browsed.conf && -d /etc/cups ]];
rm -f /etc/cups/cups-browsed.conf.pacnew
fi
if lspci -nn | grep -q "106b:180[12]"; then
cat >> /etc/pacman.conf <<'EOF'
[arch-mact2]
Server = https://github.com/NoaHimesaka1873/arch-mact2-mirror/releases/download/release
SigLevel = Never
EOF
fi
source "$OMARCHY_INSTALL/hardware/pacman.sh"
+4 -8
View File
@@ -1,8 +1,4 @@
run_logged $OMARCHY_INSTALL/post-install/first-run-mode.sh
run_logged $OMARCHY_INSTALL/post-install/pacman.sh
run_logged $OMARCHY_INSTALL/post-install/legacy-cleanup.sh
run_logged $OMARCHY_INSTALL/post-install/udev.sh
run_logged $OMARCHY_INSTALL/post-install/localdb.sh
if install_mode_is online; then
run_logged $OMARCHY_INSTALL/post-install/allow-reboot.sh
fi
run_logged "$OMARCHY_INSTALL/post-install/dns-resolver.sh"
run_logged "$OMARCHY_INSTALL/post-install/pacman.sh"
run_logged "$OMARCHY_INSTALL/post-install/udev.sh"
run_logged "$OMARCHY_INSTALL/post-install/localdb.sh"