diff options
| author | Blake Romero <blake@blkrom.com> | 2024-09-21 01:55:52 +0100 |
|---|---|---|
| committer | Blake Romero <blake@blkrom.com> | 2024-09-21 01:55:52 +0100 |
| commit | b370dde629290c654aaff75c010b9aadb6ddd0d5 (patch) | |
| tree | 001080e8a932bda52dea65fecda740154e0e020f /install.sh | |
| parent | 77e890fb6ea763c9d8be303277c84c6b06229d7f (diff) | |
Add greeter option
Diffstat (limited to 'install.sh')
| -rw-r--r-- | install.sh | 46 |
1 files changed, 24 insertions, 22 deletions
@@ -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 |
