From a6dbe2cd0aee57bc0c036eaf7a473f7f7cddf200 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..933a91c 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; }; };