system/services/greetd: fix login delay

This commit is contained in:
Anthony Rodriguez 2024-11-08 23:17:53 +01:00
parent 4b2053f00c
commit 233bdb554c
Signed by: nezia
GPG key ID: EE3BE97C040A86CE

View file

@ -49,9 +49,12 @@ in {
default_session = let
niri = getExe config.programs.niri.package;
regreet = getExe config.programs.regreet.package;
# needed because we need to run niri msg quit inside of niri itself (it needs the socket)
greeterScript = pkgs.writeScript "greeter-script" ''
${regreet} && ${niri} msg action quit --skip-confirmation
'';
in {
# TODO: kill niri after logging in so we don't have to wait for greetd to do it (can get pretty long)
command = "${niri} -c ${niri-config} -- ${regreet}";
command = "${niri} -c ${niri-config} -- ${greeterScript}";
user = "greeter";
};
};