Installing greetd on MNT Reform

Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install greetd

# Clone the code
git clone https://git.sr.ht/~kennylevinsen/greetd

# Compile greetd and agreety.
cargo build --release

# Put things into place
sudo cp target/release/{greetd,agreety} /usr/local/bin/
sudo cp greetd.service /etc/systemd/system/greetd.service
mkdir /etc/greetd
cp config.toml /etc/greetd/config.toml

# Create the greeter user
sudo useradd -M -G video greeter
sudo chmod -R go+r /etc/greetd/

At this point you should be able to logout and back in, then start greetd with:

sudo systemctl start greetd

This should give you the same login screen, since agreety looks similar to the normal login - agetty configuration.

Install gtkgreet

# Install dependencies
sudo apt install libjson-c-dev libgtk-3-dev gtk-layer-shell-dev


# Clone the code
git clone https://git.sr.ht/~kennylevinsen/gtkgreet

# Compile
meson build
ninja -C build
meson install

Configure gtkgreet

Create /etc/greetd/environments:

sway
bash

Create /etc/greetd/sway-config:

exec "gtkgreet -l; swaymsg exit"

bindsym Mod4+shift+e exec swaynag \
	-t warning \
	-m 'What do you want to do?' \
	-b 'Poweroff' 'systemctl poweroff' \
	-b 'Reboot' 'systemctl reboot'

include /etc/sway/config.d/*

Edit /etc/greetd/config.toml:

# sway
command = "sway --config /etc/greetd/sway-config"

Sources