add greetd with tui greet

Signed-off-by: gwg313 <gwg313@pm.me>
This commit is contained in:
gwg313 2026-04-15 22:52:02 -04:00
parent ebc1be5217
commit eb910d2cd5
Signed by: gwg313
GPG key ID: 60FF63B4826B7400

View file

@ -26,32 +26,34 @@
imports = [
../../nixos/gui/xdg.nix
];
services.greetd =
let
niri-config = pkgs.writeText "niri-config" ''
hotkey-overlay {
skip-at-startup
}
environment {
GTK_USE_PORTAL "0"
GDK_DEBUG "no-portals"
}
// other settings
spawn-at-startup "sh" "-c" "${pkgs.greetd.regreet}/bin/regreet; pkill -f niri"
'';
in
{
services.greetd = {
enable = true;
settings = {
default_session = {
command = "niri -c ${niri-config}";
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --remember --asterisks --container-padding 2 --no-xsession-wrapper --cmd niri-session";
user = "greeter";
};
};
};
programs.regreet.enable = true;
# this is a life saver.
# literally no documentation about this anywhere.
# might be good to write about this...
# https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/
# systemd = {
# # To prevent getting stuck at shutdown
# extraConfig = "DefaultTimeoutStopSec=10s";
# services.greetd.serviceConfig = {
# Type = "idle";
# StandardInput = "tty";
# StandardOutput = "tty";
# StandardError = "journal";
# TTYReset = true;
# TTYVHangup = true;
# TTYVTDisallocate = true;
# };
# };
# services.displayManager.enable = false;
# services.displayManager = {
# sddm = {