fix: start apps only on graphical not before

This commit is contained in:
2024-10-30 23:21:58 +01:00
parent 174545011f
commit 3221f541f4

View File

@ -4,7 +4,8 @@
onepassword-autostart = { onepassword-autostart = {
Unit = { Unit = {
Description = "Start 1Password on login"; Description = "Start 1Password on login";
After = [ "graphical-session-pre.target" ]; # Change 'After' to use 'graphical-session.target' directly
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ];
}; };
Service = { Service = {
@ -12,14 +13,14 @@
Restart = "no"; Restart = "no";
}; };
Install = { Install = {
WantedBy = [ "graphical-session.target" ]; WantedBy = [ "default.target" ]; # Target used for generic user services
}; };
}; };
trayscale-autostart = { trayscale-autostart = {
Unit = { Unit = {
Description = "Start Trayscale on login"; Description = "Start Trayscale on login";
After = [ "graphical-session-pre.target" ]; After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ];
}; };
Service = { Service = {
@ -27,14 +28,14 @@
Restart = "no"; Restart = "no";
}; };
Install = { Install = {
WantedBy = [ "graphical-session.target" ]; WantedBy = [ "default.target" ];
}; };
}; };
vesktop-autostart = { vesktop-autostart = {
Unit = { Unit = {
Description = "Start Vesktop on login"; Description = "Start Vesktop on login";
After = [ "graphical-session-pre.target" ]; After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ];
}; };
Service = { Service = {
@ -42,14 +43,14 @@
Restart = "no"; Restart = "no";
}; };
Install = { Install = {
WantedBy = [ "graphical-session.target" ]; WantedBy = [ "default.target" ];
}; };
}; };
telegram-autostart = { telegram-autostart = {
Unit = { Unit = {
Description = "Start Telegram Desktop on login"; Description = "Start Telegram Desktop on login";
After = [ "graphical-session-pre.target" ]; After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ];
}; };
Service = { Service = {
@ -57,14 +58,29 @@
Restart = "no"; Restart = "no";
}; };
Install = { Install = {
WantedBy = [ "graphical-session.target" ]; WantedBy = [ "default.target" ];
};
};
whatsapp-for-linux-autostart = {
Unit = {
Description = "Start WhatsApp for Linux on login";
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${pkgs.whatsapp-for-linux}/bin/whatsapp-for-linux";
Restart = "no";
};
Install = {
WantedBy = [ "default.target" ];
}; };
}; };
spotify-autostart = { spotify-autostart = {
Unit = { Unit = {
Description = "Start Spotify on login"; Description = "Start Spotify on login";
After = [ "graphical-session-pre.target" ]; After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ];
}; };
Service = { Service = {
@ -72,8 +88,8 @@
Restart = "no"; Restart = "no";
}; };
Install = { Install = {
WantedBy = [ "graphical-session.target" ]; WantedBy = [ "default.target" ];
}; };
}; };
}; };
} }