diff --git a/modules/programs/waybar.nix b/modules/programs/waybar.nix index bf63dcc7b..3cf919cc7 100644 --- a/modules/programs/waybar.nix +++ b/modules/programs/waybar.nix @@ -370,14 +370,13 @@ in { "Highly customizable Wayland bar for Sway and Wlroots based compositors."; Documentation = "https://github.com/Alexays/Waybar/wiki"; PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; }; Service = { - Type = "dbus"; - BusName = "fr.arouillard.waybar"; ExecStart = "${cfg.package}/bin/waybar"; - Restart = "always"; - RestartSec = "1sec"; + ExecReload = "kill -SIGUSR2 $MAINPID"; + Restart = "on-failure"; KillMode = "mixed"; }; 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 9bdcf78c4..e03326e6e 100644 --- a/tests/modules/programs/waybar/systemd-with-graphical-session-target.service +++ b/tests/modules/programs/waybar/systemd-with-graphical-session-target.service @@ -2,14 +2,13 @@ WantedBy=graphical-session.target [Service] -BusName=fr.arouillard.waybar +ExecReload=kill -SIGUSR2 $MAINPID ExecStart=@waybar@/bin/waybar KillMode=mixed -Restart=always -RestartSec=1sec -Type=dbus +Restart=on-failure [Unit] +After=graphical-session.target Description=Highly customizable Wayland bar for Sway and Wlroots based compositors. Documentation=https://github.com/Alexays/Waybar/wiki PartOf=graphical-session.target