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
+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