diff --git a/modules/programs/waybar.nix b/modules/programs/waybar.nix index faef644d3..12002d546 100644 --- a/modules/programs/waybar.nix +++ b/modules/programs/waybar.nix @@ -318,7 +318,7 @@ in { Service = { ExecStart = "${cfg.package}/bin/waybar"; - ExecReload = "kill -SIGUSR2 $MAINPID"; + ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID"; Restart = "on-failure"; KillMode = "mixed"; }; diff --git a/tests/modules/programs/waybar/systemd-with-graphical-session-target.nix b/tests/modules/programs/waybar/systemd-with-graphical-session-target.nix index 624ab5039..dc7a620fa 100644 --- a/tests/modules/programs/waybar/systemd-with-graphical-session-target.nix +++ b/tests/modules/programs/waybar/systemd-with-graphical-session-target.nix @@ -17,9 +17,10 @@ with lib; assertPathNotExists home-files/.config/waybar/config assertPathNotExists home-files/.config/waybar/style.css - assertFileContent \ - home-files/.config/systemd/user/waybar.service \ - ${./systemd-with-graphical-session-target.service} + serviceFile=$(normalizeStorePaths home-files/.config/systemd/user/waybar.service) + assertFileContent "$serviceFile" ${ + ./systemd-with-graphical-session-target.service + } ''; }; } 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 a954207d3..e1343da8a 100644 --- a/tests/modules/programs/waybar/systemd-with-graphical-session-target.service +++ b/tests/modules/programs/waybar/systemd-with-graphical-session-target.service @@ -2,7 +2,7 @@ WantedBy=sway-session.target [Service] -ExecReload=kill -SIGUSR2 $MAINPID +ExecReload=/nix/store/00000000000000000000000000000000-coreutils/bin/kill -SIGUSR2 $MAINPID ExecStart=@waybar@/bin/waybar KillMode=mixed Restart=on-failure