diff --git a/flake.nix b/flake.nix index dec2c35..5b7ee16 100644 --- a/flake.nix +++ b/flake.nix @@ -91,11 +91,17 @@ systemd.user.services.lastfmpris = { Unit = { Description = "a rust application to scrobble your currently playing song on last.fm with mpris"; - Requires = ["graphical-session.target"]; + After = [ "graphical-session-pre.target" ]; + PartOf = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["graphical-session.target"]; }; Service = { Type = "simple"; ExecStart = "${lib.getExe cfg.package}"; + Restart = "on-failure"; + RestartSec = 1; }; };