Setup sudoless install in the autorstart instead

This commit is contained in:
David Heinemeier Hansson committed 2025-08-20 16:41:51 +02:00
1 parent 5994ea63e5
commit 9f3d699243
2 files changed
+2 -10

No files matched your search

+2 -5
View File
@@ -28,12 +28,9 @@ if [[ $(tty) == "/dev/tty1" ]]; then
OMARCHY_USER="$(ls -1 /mnt/home | head -n1)"
# Copy sudoers config to target system for passwordless sudo in chroot
# No need to ask for sudo during the installation (omarchy itself responsible for removing after install)
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
echo "root ALL=(ALL:ALL) NOPASSWD: ALL\n%wheel ALL=(ALL:ALL) NOPASSWD: ALL\n$OMARCHY_USER ALL=(ALL:ALL) NOPASSWD: ALL" >/mnt/etc/sudoers.d/99-omarchy-installer
HOME=/home/$OMARCHY_USER \
arch-chroot -u $OMARCHY_USER /mnt/ \
-5
View File
@@ -24,11 +24,6 @@ rm "airootfs/etc/systemd/system/multi-user.target.wants/reflector.service"
rm -rf "airootfs/etc/systemd/system/reflector.service.d"
rm -rf "airootfs/etc/xdg/reflector"
# Configure sudoers for passwordless installation
# This allows the installer to run without password prompts
# mkdir -p "$cache_dir/airootfs/etc/sudoers.d"
# cp /builder/configs/sudo-less-installation "$cache_dir/airootfs/etc/sudoers.d/99-omarchy-installer"
# Ensure the Omarchy installer launches automatically on boot
cp /builder/cmds/autostart.sh airootfs/root/.automated_script.sh