diff --git a/builder/cmds/autostart.sh b/builder/cmds/autostart.sh index a3a1eb6..e465544 100644 --- a/builder/cmds/autostart.sh +++ b/builder/cmds/autostart.sh @@ -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/ \ diff --git a/builder/online.sh b/builder/online.sh index 15b94b0..cafab0f 100755 --- a/builder/online.sh +++ b/builder/online.sh @@ -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