status-notifier-watcher: introduce unit start delay

Fixes #1312
This commit is contained in:
Robert Helgesson 2020-06-10 23:32:44 +02:00
parent c378c1cbcd
commit 02c1f8d416
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -34,7 +34,14 @@ in {
Before = [ "taffybar.service" ]; Before = [ "taffybar.service" ];
}; };
Service = { ExecStart = "${cfg.package}/bin/status-notifier-watcher"; }; Service = {
ExecStart = "${cfg.package}/bin/status-notifier-watcher";
# Delay the unit start a bit to allow the program to get fully
# set up before letting dependent services start. This is
# brittle and a better solution using, e.g., `BusName=` might
# be possible.
ExecStartPost = "${pkgs.coreutils}/bin/sleep 1";
};
Install = { Install = {
WantedBy = [ "graphical-session.target" "taffybar.service" ]; WantedBy = [ "graphical-session.target" "taffybar.service" ];