From 77e890fb6ea763c9d8be303277c84c6b06229d7f Mon Sep 17 00:00:00 2001 From: Blake Romero Date: Sat, 21 Sep 2024 01:37:32 +0100 Subject: Configure tuigreet setup --- install.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 6a823ef..08356c3 100644 --- a/install.sh +++ b/install.sh @@ -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 -- cgit