From abc9d96d19e2c8a7f3a32b74894dc16ba4c25df0 Mon Sep 17 00:00:00 2001 From: Pierre Labadens Date: Sat, 6 Mar 2021 08:09:51 +0100 Subject: [PATCH] waybar: fix slow service stop (#1852) Set the systemd user service to use "mixed" killmode, which lets waybar stop its module scripts. This fixes issues where waybar blocks shutdown until systemd sends a SIGKILL to waybar child processes. --- modules/programs/waybar.nix | 1 + .../waybar/systemd-with-graphical-session-target.service | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/programs/waybar.nix b/modules/programs/waybar.nix index 5472a0ef4..bf63dcc7b 100644 --- a/modules/programs/waybar.nix +++ b/modules/programs/waybar.nix @@ -378,6 +378,7 @@ in { ExecStart = "${cfg.package}/bin/waybar"; Restart = "always"; RestartSec = "1sec"; + KillMode = "mixed"; }; Install = { WantedBy = [ "graphical-session.target" ]; }; diff --git a/tests/modules/programs/waybar/systemd-with-graphical-session-target.service b/tests/modules/programs/waybar/systemd-with-graphical-session-target.service index 64c89f93d..9bdcf78c4 100644 --- a/tests/modules/programs/waybar/systemd-with-graphical-session-target.service +++ b/tests/modules/programs/waybar/systemd-with-graphical-session-target.service @@ -4,6 +4,7 @@ WantedBy=graphical-session.target [Service] BusName=fr.arouillard.waybar ExecStart=@waybar@/bin/waybar +KillMode=mixed Restart=always RestartSec=1sec Type=dbus