diff options
| -rw-r--r-- | install.sh | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -276,10 +276,10 @@ artix-chroot /mnt bash -c "echo \"${user}:${password}\" | chpasswd" echo " Cmnd_Alias STAT = /usr/bin/ufw status Cmnd_Alias PACMAN = /usr/bin/checkupdates -Cmnd_Alias REBOOT = /bin/halt,/bin/reboot +Cmnd_Alias POWER = /usr/bin/halt,/usr/bin/reboot Defaults pwfeedback %wheel ALL=(ALL) ALL -${user} ALL=(ALL) NOPASSWD: PACMAN,REBOOT,STAT +${user} ALL=(ALL) NOPASSWD: PACMAN,POWER,STAT " >> /mnt/etc/sudoers # Setup greetd login manager @@ -288,8 +288,18 @@ services+=" greetd" # disable tty1 console for greetd login sed 's/\[.*\]/\[2-6\]/' -i /mnt/etc/dinit.d/config/console.conf # set tuigreet as greetd command -sed 's,^command =.*,command = "tuigreet --cmd /bin/bash",' \ +tuigreet_args="\ +--cmd /bin/bash \ +--power-shutdown 'sudo halt' \ +--power-reboot 'sudo reboot' \ +--power-no-setsid \ +--asterisks \ +--remember \ +--time" +sed "s,^command =.*,command = \"tuigreet ${tuigreet_args}\"," \ -i /mnt/etc/greetd/config.toml +# Allow greeter to run power commands +printf "greeter ALL=(ALL) NOPASSWD: POWER\n" >> /mnt/etc/sudoers # Autologin if [[ "${autologin}" == true ]]; then |
