waybar: fix command not found when reloading (#2865)

This commit is contained in:
Daniel Thwaites 2022-04-16 23:31:03 +01:00 committed by GitHub
parent 7add9ce2e5
commit a640dddc9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View file

@ -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";
};

View file

@ -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
}
'';
};
}

View file

@ -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