summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--install.sh41
1 files changed, 30 insertions, 11 deletions
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" \