From 06543644266edcf845ac912002868246b58d19e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Sat, 28 Nov 2020 13:06:21 +0900 Subject: [PATCH] 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 --- modules/programs/waybar.nix | 2 -- .../waybar/systemd-with-graphical-session-target.service | 2 -- 2 files changed, 4 deletions(-) diff --git a/modules/programs/waybar.nix b/modules/programs/waybar.nix index 5b3acf14..a2b8aa0f 100644 --- a/modules/programs/waybar.nix +++ b/modules/programs/waybar.nix @@ -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 = { diff --git a/tests/modules/programs/waybar/systemd-with-graphical-session-target.service b/tests/modules/programs/waybar/systemd-with-graphical-session-target.service index 7d4c6521..64c89f93 100644 --- a/tests/modules/programs/waybar/systemd-with-graphical-session-target.service +++ b/tests/modules/programs/waybar/systemd-with-graphical-session-target.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