1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 02:39:48 +01:00
home-manager/tests/modules/programs/waybar/systemd-with-graphical-session-target.service
Blaž Hrastnik 0654364426
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
2020-12-01 23:07:39 +01:00

14 lines
332 B
Desktop File

[Install]
WantedBy=graphical-session.target
[Service]
BusName=fr.arouillard.waybar
ExecStart=@waybar@/bin/waybar
Restart=always
RestartSec=1sec
Type=dbus
[Unit]
Description=Highly customizable Wayland bar for Sway and Wlroots based compositors.
Documentation=https://github.com/Alexays/Waybar/wiki
PartOf=graphical-session.target