waybar: fix systemd service

The current definition makes waybar wait for dbus.service, but that
never happens because dbus.service is started on demand by
dbus.socket.

Per systemd docs:
  https://www.freedesktop.org/software/systemd/man/systemd.service.html#Implicit%20Dependencies

- Services with Type=dbus set automatically acquire dependencies of
  type Requires= and After= on dbus.socket.

- Socket activated services are automatically ordered after their
  activating .socket units via an automatic After= dependency.
  Services also pull in all .socket units listed in Sockets= via
  automatic Wants= and After= dependencies.

Removing Requisite/After makes the service properly start for me,
simply specifying Type=dbus is enough.

See #1370
wip/yesman
Blaž Hrastnik 4 years ago committed by Robert Helgesson
parent 0027b0e76b
commit 0654364426
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89
  1. 2
      modules/programs/waybar.nix
  2. 2
      tests/modules/programs/waybar/systemd-with-graphical-session-target.service

@ -356,8 +356,6 @@ in {
"Highly customizable Wayland bar for Sway and Wlroots based compositors.";
Documentation = "https://github.com/Alexays/Waybar/wiki";
PartOf = [ "graphical-session.target" ];
Requisite = [ "dbus.service" ];
After = [ "dbus.service" ];
};
Service = {

@ -9,8 +9,6 @@ RestartSec=1sec
Type=dbus
[Unit]
After=dbus.service
Description=Highly customizable Wayland bar for Sway and Wlroots based compositors.
Documentation=https://github.com/Alexays/Waybar/wiki
PartOf=graphical-session.target
Requisite=dbus.service

Loading…
Cancel
Save