From efb3325132316d732a937ee5255c0921982221b4 Mon Sep 17 00:00:00 2001 From: Blake Romero Date: Sat, 21 Sep 2024 00:42:25 +0100 Subject: Add & updated configuration for greetd & tuigreet --- install.sh | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index 934aa60..6a823ef 100644 --- a/install.sh +++ b/install.sh @@ -239,12 +239,6 @@ basestrap /mnt --needed \ services="dbus ufw iwd dhcpcd ntpd" [[ "${elogind}" == false ]] && services+=" turnstiled seatd" -# NOTE: do not quote 'services' variable or space is ignored -for service in ${services}; do - artix-chroot /mnt bash -c \ - "ln -s /etc/dinit.d/$service /etc/dinit.d/boot.d/" -done - # Generate file-system table fstabgen -L /mnt >> /mnt/etc/fstab @@ -288,19 +282,44 @@ Defaults pwfeedback ${user} ALL=(ALL) NOPASSWD: PACMAN,REBOOT,STAT " >> /mnt/etc/sudoers -# Add user to autologin (note: password must match decryption password) +# Setup greetd login manager +basestrap /mnt --needed {greetd,tuigreet}-dinit +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",' \ + -i /mnt/etc/greetd/config.toml + +# Autologin if [[ "${autologin}" == true ]]; then - cp /mnt/etc/dinit.d/config/agetty-default.conf \ - /mnt/etc/dinit.d/config/agetty-tty1.conf - sed "s/GETTY_ARGS=.*/GETTY_ARGS=\"--noclear --autologin ${user}\"/" \ - -i /mnt/etc/dinit.d/config/agetty-tty1.conf + echo " +[initial_session] +command = \"bash\" +user = \"${user}\" +" >> /mnt/etc/greetd/config.toml fi +# # Autologin (when not using greetd login manager) +# if [[ "${autologin}" == true ]]; then +# cp /mnt/etc/dinit.d/config/agetty-default.conf \ +# /mnt/etc/dinit.d/config/agetty-tty1.conf +# sed "s/GETTY_ARGS=.*/GETTY_ARGS=\"--noclear --autologin ${user}\"/" \ +# -i /mnt/etc/dinit.d/config/agetty-tty1.conf +# fi + # Setup user dinit log directory mkdir /mnt/var/log/dinit/user chgrp log /mnt/var/log/dinit/user chmod g+rw /mnt/var/log/dinit/user +# Enable services +# NOTE: do not quote 'services' variable or space is ignored +for service in ${services}; do + artix-chroot /mnt bash -c \ + "ln -s /etc/dinit.d/$service /etc/dinit.d/boot.d/" +done + # Add PACMAN download style pac_options=ILoveCandy sed "s/# Misc options/# Misc options\n${pac_options}/g" \ -- cgit