Clean up the online installer

This commit is contained in:
David Heinemeier Hansson committed 2025-08-20 09:37:18 +02:00
1 parent e2183fefee
commit cb078cc13a
14 files changed
+59 -111

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $(tty) == "/dev/tty1" ]]; then
NETWORK_NEEDED=1 sh ./installer
archinstall \
--config user_configuration.json \
--creds user_credentials.json \
--silent
OMARCHY_USER="$(ls -1 /mnt/home | head -n1)"
# Copy sudoers config to target system for passwordless sudo in chroot
mkdir -p /mnt/etc/sudoers.d
cp /etc/sudoers.d/99-omarchy-installer /mnt/etc/sudoers.d/
# Also ensure the user can run sudo without password in chroot
echo "$OMARCHY_USER ALL=(ALL:ALL) NOPASSWD: ALL" >>/mnt/etc/sudoers.d/99-omarchy-installer
HOME=/home/$OMARCHY_USER \
arch-chroot -u $OMARCHY_USER /mnt/ \
env OMARCHY_USER_NAME="$(<user_full_name.txt)" \
OMARCHY_USER_EMAIL="$(<user_email_address.txt)" \
/bin/bash -lc "wget -qO- https://omarchy.org/install-dev | bash"
fi