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/ \