Better config for sudoless

This commit is contained in:
David Heinemeier Hansson committed 2025-08-20 17:54:52 +02:00
1 parent e8110b9f8d
commit 6e59ff91d1
1 file changed
+5 -1
+5 -1
View File
@@ -39,7 +39,11 @@ if [[ $(tty) == "/dev/tty1" ]]; then
# No need to ask for sudo during the installation (omarchy itself responsible for removing after install)
mkdir -p /mnt/etc/sudoers.d
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
cat >/mnt/etc/sudoers.d/99-omarchy-installer <<EOF
root ALL=(ALL:ALL) NOPASSWD: ALL
%wheel ALL=(ALL:ALL) NOPASSWD: ALL
$OMARCHY_USER ALL=(ALL:ALL) NOPASSWD: ALL
EOF
chmod 440 /mnt/etc/sudoers.d/99-omarchy-installer
chmod 440 /mnt/etc/sudoers.d/99-omarchy-installer