This repository has been archived on 2024-04-14. You can view files and clone it, but cannot push or open issues or pull requests.
2023-12-21 17:33:57 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
cfg = config.services.mpd-notification;
|
2023-12-12 12:20:55 +00:00
|
|
|
in {
|
2023-12-21 17:33:57 +00:00
|
|
|
options.services.mpd-notification = {
|
|
|
|
package = lib.mkPackageOption pkgs "mpd-notification" {};
|
|
|
|
enable = lib.mkEnableOption "the mpd-notification service";
|
|
|
|
};
|
2023-12-12 12:20:55 +00:00
|
|
|
|
2023-12-21 17:33:57 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
systemd.user.services.mpd-notification = {
|
|
|
|
Unit = {
|
|
|
|
Description = "A notification daemon for MPD";
|
|
|
|
Documentation = "https://github.com/eworm-de/mpd-notification";
|
|
|
|
After = ["mpd.service" "network.target" "network-online.target"];
|
|
|
|
Requires = ["dbus.socket"];
|
|
|
|
};
|
2023-12-12 12:20:55 +00:00
|
|
|
|
2023-12-21 17:33:57 +00:00
|
|
|
Service = {
|
|
|
|
Type = "simple";
|
|
|
|
Restart = "on-failure";
|
|
|
|
ExecStart = "${cfg.package}/bin/mpd-notification";
|
|
|
|
};
|
2023-12-12 12:20:55 +00:00
|
|
|
};
|
2023-12-21 17:33:57 +00:00
|
|
|
};
|
2023-12-12 12:20:55 +00:00
|
|
|
}
|