1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2025-01-06 00:59:48 +01:00

mpdris2: improve service description

In particular, make sure the systemd service actually starts.

(cherry picked from commit 34dc4a5e03)
This commit is contained in:
leotaku 2019-11-23 23:22:22 +01:00 committed by Robert Helgesson
parent 0d7b515a65
commit 22076437f3
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -86,15 +86,21 @@ in
xdg.configFile."mpDris2/mpDris2.conf".text = toIni mpdris2Conf;
systemd.user.services.mpdris2 = {
Install = {
WantedBy = [ "default.target" ];
};
Unit = {
Description = "MPRIS 2 support for MPD";
After = [ "graphical-session-pre.target" "mpd.service" ];
PartOf = [ "graphical-session.target" ];
After = [ "mpd.service" ];
};
Service = {
Type = "simple";
Restart = "on-failure";
RestartSec = "5s";
ExecStart = "${cfg.package}/bin/mpDris2";
BusName = "org.mpris.MediaPlayer2.mpd";
};
};
};