# greetd — autologin straight into the kiosk Sway session, no greeter UI.
# Installed to /etc/greetd/config.toml by build-thin-client-iso.sh, which substitutes
# @KIOSK_USERNAME@ with its own KIOSK_USERNAME variable on the way in.
#
# Schema note (getting these key names wrong fails silently — you get a black VT with
# no login, and greetd logs nothing obvious): the table names are exactly [terminal]
# and [default_session], and the session keys are exactly `command` and `user`.
#
# Why [default_session] and not [initial_session]: [initial_session] fires once, on
# the first greetd start after boot, and greetd falls back to [default_session] the
# moment that session ends. For an always-on kiosk that would mean one crash or one
# `swaymsg exit` drops the machine to whatever [default_session] is (by default an
# agreety login prompt). Pointing [default_session] itself at the kiosk user makes the
# autologin permanent and self-healing. [initial_session] is deliberately absent.

[terminal]
vt = 1

[default_session]
command = "/usr/local/bin/kiosk-session"
user = "@KIOSK_USERNAME@"
