λ gtkgreet --help
gtkgreet [OPTION…] - GTK-based greeter for greetd
-h, --help Show help options
--help-all Show all help options
--help-gtk Show GTK+ Options
-l, --layer-shell Use layer shell
-c, --command=sway Command to run
-b, --background Background image to use
-s, --style CSS style to use
--display=DISPLAY X display to use
I have a similar but different setup. I’m using Hyprland, swaylock, but experimented with gtkgreet. I wasn’t able to get gtkgreet to start the Hyprland session. I then tried calling “exec-once gtkgreet -l -c Hyprland” from my ~/.config/hypr/hyprland.conf file, but that didn’t quite work.
I’ve settled on just using swaylock since my use case is a single user and single session environment (Hyprland), so the extra choices of user and environment aren’t needed…all I’m after is authentication.
Merged PR with Swaylock
That hash of the repo/tree shows the home-manager configuration (hyprland.conf) and the nix configuration file (modules/desktop/hyprland/default.nix).
This configuration logins in automatically to “iancleary” (my username) and then the hyprland.conf calls “exec-once swaylock” to prompt for authentication.