summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--install.sh16
1 files 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