installer: route install through system and user phases

This commit is contained in:
Ryan Hughes
2026-06-04 18:35:01 -04:00
parent 53e2611507
commit 0cfa1b66c4
16 changed files with 209 additions and 87 deletions
+2 -17
View File
@@ -1,21 +1,9 @@
run_logged $OMARCHY_INSTALL/config/theme.sh
run_logged $OMARCHY_INSTALL/config/git.sh
run_logged $OMARCHY_INSTALL/config/gpg.sh
run_logged $OMARCHY_INSTALL/config/theme-system.sh
run_logged $OMARCHY_INSTALL/config/increase-lockout-limit.sh
run_logged $OMARCHY_INSTALL/config/lockscreen-pam.sh
run_logged $OMARCHY_INSTALL/config/sleep-lock.sh
run_logged $OMARCHY_INSTALL/config/increase-file-watchers.sh
run_logged $OMARCHY_INSTALL/config/increase-fd-limit.sh
run_logged $OMARCHY_INSTALL/config/xcompose.sh
run_logged $OMARCHY_INSTALL/config/mise-work.sh
run_logged $OMARCHY_INSTALL/config/fix-powerprofilesctl-shebang.sh
run_logged $OMARCHY_INSTALL/config/docker.sh
run_logged $OMARCHY_INSTALL/config/localdb.sh
run_logged $OMARCHY_INSTALL/config/fast-shutdown.sh
run_logged $OMARCHY_INSTALL/config/input-group.sh
run_logged $OMARCHY_INSTALL/config/pi.sh
run_logged $OMARCHY_INSTALL/config/powerprofilesctl-rules.sh
run_logged $OMARCHY_INSTALL/config/wifi-powersave-rules.sh
# Service enables centralized; run after all drop-in files are in place.
run_logged $OMARCHY_INSTALL/config/enable-services.sh
@@ -23,6 +11,7 @@ run_logged $OMARCHY_INSTALL/config/enable-services.sh
run_logged $OMARCHY_INSTALL/config/hardware/network.sh
run_logged $OMARCHY_INSTALL/config/hardware/set-wireless-regdom.sh
run_logged $OMARCHY_INSTALL/config/hardware/fix-fkeys.sh
run_logged $OMARCHY_INSTALL/config/hardware/fix-synaptic-touchpad.sh
run_logged $OMARCHY_INSTALL/config/hardware/bluetooth.sh
run_logged $OMARCHY_INSTALL/config/hardware/nvidia.sh
run_logged $OMARCHY_INSTALL/config/hardware/vulkan.sh
@@ -39,11 +28,8 @@ run_logged $OMARCHY_INSTALL/config/hardware/intel/sof-firmware.sh
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-display-backlight.sh
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-display.sh
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-touchpad.sh
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-audio-mixer.sh
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-mic.sh
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-z13-touchpad.sh
run_logged $OMARCHY_INSTALL/config/hardware/framework/fix-f13-amd-audio-input.sh
run_logged $OMARCHY_INSTALL/config/hardware/framework/qmk-hid.sh
run_logged $OMARCHY_INSTALL/config/hardware/apple/fix-spi-keyboard.sh
@@ -55,5 +41,4 @@ run_logged $OMARCHY_INSTALL/config/hardware/lenovo/fix-yoga-pro7-bass-speakers.s
run_logged $OMARCHY_INSTALL/config/hardware/fix-bcm43xx.sh
run_logged $OMARCHY_INSTALL/config/hardware/fix-surface-keyboard.sh
run_logged $OMARCHY_INSTALL/config/hardware/fix-yt6801-ethernet-adapter.sh
run_logged $OMARCHY_INSTALL/config/hardware/fix-synaptic-touchpad.sh
run_logged $OMARCHY_INSTALL/config/hardware/fix-tuxedo-backlight.sh
+1 -1
View File
@@ -1 +1 @@
sudo /bin/rm -f /etc/sudoers.d/99-omarchy-installer-reboot
sudo -n rm -f /etc/sudoers.d/99-omarchy-installer-reboot 2>/dev/null || true
+3 -9
View File
@@ -1,15 +1,9 @@
# In offline (ISO chroot) mode systemd isn't running, so skip --now.
# Installs are followed by reboot, so enable units without starting/reloading
# running services during the install.
chrootable_systemctl_enable() {
if install_mode_is offline; then
sudo systemctl enable $1
else
sudo systemctl enable --now $1
fi
sudo systemctl enable $1
}
# Like chrootable_systemctl_enable but never passes --now. Use for services
# we shouldn't (re)start mid-install (iwd interrupts the network; docker and
# power-profiles-daemon should defer to first boot).
chrootable_systemctl_enable_only() {
sudo systemctl enable $1
}
+1 -6
View File
@@ -1,6 +1 @@
run_logged $OMARCHY_INSTALL/login/default-keyring.sh
run_logged $OMARCHY_INSTALL/login/sddm.sh
if install_mode_is online; then
run_logged $OMARCHY_INSTALL/login/hibernation.sh
fi
run_logged $OMARCHY_INSTALL/login/limine-snapper.sh
source $OMARCHY_INSTALL/login/system.sh
+6 -2
View File
@@ -4,7 +4,8 @@ DEFAULT_FILE="$KEYRING_DIR/default"
mkdir -p "$KEYRING_DIR"
cat << EOF > "$KEYRING_FILE"
if [[ ! -f $KEYRING_FILE ]]; then
cat > "$KEYRING_FILE" <<EOF
[keyring]
display-name=Default keyring
ctime=$(date +%s)
@@ -12,10 +13,13 @@ mtime=0
lock-on-idle=false
lock-after=false
EOF
fi
cat << EOF > "$DEFAULT_FILE"
if [[ ! -f $DEFAULT_FILE ]]; then
cat > "$DEFAULT_FILE" <<EOF
Default_keyring
EOF
fi
chmod 700 "$KEYRING_DIR"
chmod 600 "$KEYRING_FILE"
+2 -9
View File
@@ -1,9 +1,2 @@
run_logged $OMARCHY_INSTALL/packaging/nvim.sh
run_logged $OMARCHY_INSTALL/packaging/icons.sh
run_logged $OMARCHY_INSTALL/packaging/webapps.sh
run_logged $OMARCHY_INSTALL/packaging/tuis.sh
run_logged $OMARCHY_INSTALL/packaging/mise.sh
run_logged $OMARCHY_INSTALL/packaging/asus-rog.sh
run_logged $OMARCHY_INSTALL/packaging/framework16.sh
run_logged $OMARCHY_INSTALL/packaging/dell-xps-touchpad-haptics.sh
run_logged $OMARCHY_INSTALL/packaging/surface.sh
source $OMARCHY_INSTALL/packaging/system.sh
source $OMARCHY_INSTALL/packaging/user.sh
+1 -2
View File
@@ -1,3 +1,2 @@
run_logged $OMARCHY_INSTALL/post-install/pacman.sh
source $OMARCHY_INSTALL/post-install/allow-reboot.sh
source $OMARCHY_INSTALL/post-install/system.sh
source $OMARCHY_INSTALL/post-install/finished.sh
+10 -4
View File
@@ -1,5 +1,11 @@
# Allow passwordless reboot for the installer - removed in first-run
sudo tee /etc/sudoers.d/99-omarchy-installer-reboot >/dev/null <<EOF
$USER ALL=(ALL) NOPASSWD: /usr/bin/reboot
# 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
sudo chmod 440 /etc/sudoers.d/99-omarchy-installer-reboot
chmod 440 /etc/sudoers.d/99-omarchy-installer-reboot