summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'install.sh')
-rw-r--r--install.sh46
1 files changed, 24 insertions, 22 deletions
diff --git a/install.sh b/install.sh
index 08356c3..f8c11f5 100644
--- a/install.sh
+++ b/install.sh
@@ -282,13 +282,15 @@ Defaults pwfeedback
${user} ALL=(ALL) NOPASSWD: PACMAN,POWER,STAT
" >> /mnt/etc/sudoers
-# 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
-tuigreet_args="\
+# Login
+# when using greetd
+if [[ "${greeter}" == greetd ]]; then
+ 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
+ tuigreet_args="\
--cmd /bin/bash \
--power-shutdown 'sudo halt' \
--power-reboot 'sudo reboot' \
@@ -296,28 +298,28 @@ tuigreet_args="\
--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
+ 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
- echo "
+ if [[ "${autologin}" == true ]]; then
+ echo "
[initial_session]
command = \"bash\"
user = \"${user}\"
" >> /mnt/etc/greetd/config.toml
+ fi
+else
+ # when using agetty
+ 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
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