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 = { Service = {
ExecStart = "${cfg.package}/bin/waybar"; ExecStart = "${cfg.package}/bin/waybar";
ExecReload = "kill -SIGUSR2 $MAINPID"; ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID";
Restart = "on-failure"; Restart = "on-failure";
KillMode = "mixed"; KillMode = "mixed";
}; };

View file

@ -17,9 +17,10 @@ with lib;
assertPathNotExists home-files/.config/waybar/config assertPathNotExists home-files/.config/waybar/config
assertPathNotExists home-files/.config/waybar/style.css assertPathNotExists home-files/.config/waybar/style.css
assertFileContent \ serviceFile=$(normalizeStorePaths home-files/.config/systemd/user/waybar.service)
home-files/.config/systemd/user/waybar.service \ assertFileContent "$serviceFile" ${
${./systemd-with-graphical-session-target.service} ./systemd-with-graphical-session-target.service
}
''; '';
}; };
} }

View file

@ -2,7 +2,7 @@
WantedBy=sway-session.target WantedBy=sway-session.target
[Service] [Service]
ExecReload=kill -SIGUSR2 $MAINPID ExecReload=/nix/store/00000000000000000000000000000000-coreutils/bin/kill -SIGUSR2 $MAINPID
ExecStart=@waybar@/bin/waybar ExecStart=@waybar@/bin/waybar
KillMode=mixed KillMode=mixed
Restart=on-failure Restart=on-failure