From 233bdb554cd5a3ce07f56571180cb12ec25f0a0f Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Fri, 8 Nov 2024 23:17:53 +0100 Subject: [PATCH] system/services/greetd: fix login delay --- system/services/greetd.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/system/services/greetd.nix b/system/services/greetd.nix index 8cbb3e8..27af996 100644 --- a/system/services/greetd.nix +++ b/system/services/greetd.nix @@ -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"; }; };