Skip to content

Commit 4be05b0

Browse files
committed
treewide: use graphical-session.target for GUI services
As per systemd.special(7)[0] graphical-session-pre.target is strictly for units that set up things for a graphical session. Most notably, these are usually started *before* the compositor/session is actually ready. While Home Manager's current implementation of graphical-session.target allows these units to work regardless of what systemd.special(7) specifies, other setups like ones with uwsm[1] do not allow these units to start properly. [0]: https://www.freedesktop.org/software/systemd/man/latest/systemd.special.html#graphical-session-pre.target [1]: https://github.com/Vladimir-csp/uwsm Signed-off-by: Sefa Eyeoglu <[email protected]>
1 parent 086f619 commit 4be05b0

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

modules/programs/waybar.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ in {
309309
"Highly customizable Wayland bar for Sway and Wlroots based compositors.";
310310
Documentation = "https://github.com/Alexays/Waybar/wiki";
311311
PartOf = [ "graphical-session.target" ];
312-
After = [ "graphical-session-pre.target" ];
312+
After = [ "graphical-session.target" ];
313313
};
314314

315315
Service = {

modules/services/blueman-applet.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ with lib;
3030
Unit = {
3131
Description = "Blueman applet";
3232
Requires = [ "tray.target" ];
33-
After = [ "graphical-session-pre.target" "tray.target" ];
33+
After = [ "graphical-session.target" "tray.target" ];
3434
PartOf = [ "graphical-session.target" ];
3535
};
3636

modules/services/network-manager-applet.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ in {
2828
Unit = {
2929
Description = "Network Manager applet";
3030
Requires = [ "tray.target" ];
31-
After = [ "graphical-session-pre.target" "tray.target" ];
31+
After = [ "graphical-session.target" "tray.target" ];
3232
PartOf = [ "graphical-session.target" ];
3333
};
3434

modules/services/poweralertd.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ in {
2020
Unit = {
2121
Description = "UPower-powered power alerter";
2222
Documentation = "man:poweralertd(1)";
23-
After = [ "graphical-session-pre.target" ];
23+
After = [ "graphical-session.target" ];
2424
PartOf = [ "graphical-session.target" ];
2525
};
2626

modules/services/wlsunset.nix

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ in {
128128
systemd.user.services.wlsunset = {
129129
Unit = {
130130
Description = "Day/night gamma adjustments for Wayland compositors.";
131+
After = [ "graphical-session.target" ];
131132
PartOf = [ "graphical-session.target" ];
132133
};
133134

0 commit comments

Comments
 (0)