From 56eb2542da1b201472f2a792c2ae00601c34a6a6 Mon Sep 17 00:00:00 2001 From: K900 Date: Fri, 16 Feb 2024 19:42:31 +0300 Subject: [PATCH] nixos/greetd: only restart on success Otherwise, if the greeter/session crashes on startup, greetd enters a restart loop that requires very precise timing to kill. --- nixos/modules/services/display-managers/greetd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/display-managers/greetd.nix b/nixos/modules/services/display-managers/greetd.nix index 2212f97a9ffe..c2d345152de9 100644 --- a/nixos/modules/services/display-managers/greetd.nix +++ b/nixos/modules/services/display-managers/greetd.nix @@ -78,7 +78,7 @@ in serviceConfig = { ExecStart = "${pkgs.greetd.greetd}/bin/greetd --config ${settingsFormat.generate "greetd.toml" cfg.settings}"; - Restart = mkIf cfg.restart "always"; + Restart = mkIf cfg.restart "on-success"; # Defaults from greetd upstream configuration IgnoreSIGPIPE = false;