From 4a4a8bc0b0082d56fbeb1c1af1dc533b8a11601f Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Sat, 14 Sep 2024 23:46:45 -0700 Subject: [PATCH] systemd service update --- flake.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; }; };