home: Ensure proper ordering of graphical session services

This commit is contained in:
Mikael 2024-09-18 23:38:44 +02:00
parent 42b3e7fcd8
commit 141386503c
Signed by: mikael
SSH key fingerprint: SHA256:21QyD2Meiot7jOUVitIR5YkGB/XuXdCvLW1hE6dsri0
2 changed files with 16 additions and 11 deletions

View file

@ -321,6 +321,14 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) {
}; };
}; };
systemd.user.services = {
waybar = {
Unit = {
After = [ "graphical-session.target" ];
};
};
};
systemd.user.targets = { systemd.user.targets = {
tray = { tray = {
Unit = { Unit = {

View file

@ -273,17 +273,6 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) {
SSH_ASKPASS_REQUIRE = "force"; SSH_ASKPASS_REQUIRE = "force";
TERMINAL = kitty; TERMINAL = kitty;
}; };
spawn-at-startup = [
{ command = [ dbus-update "--systemd"
"NIRI_SOCKET"
"WAYLAND_DISPLAY"
"XDG_CURRENT_DESKTOP"
"XDG_SESSION_TYPE"
]; }
{ command = [ systemctl "--user" "start" "swayidle.service" ]; }
{ command = [ systemctl "--user" "start" "waybar.service" ]; }
];
}; };
programs.swaylock = { programs.swaylock = {
@ -329,6 +318,14 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) {
services.syncthing.enable = true; services.syncthing.enable = true;
systemd.user.services = {
swayidle = {
Unit = {
After = [ "graphical-session.target" ];
};
};
};
xdg.mimeApps.enable = true; xdg.mimeApps.enable = true;
xdg.portal = { xdg.portal = {