2024-04-14 14:06:38 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
options = {
|
2024-04-17 22:39:00 -04:00
|
|
|
alyraffauf.services.mpd.enable =
|
2024-04-14 14:06:38 -04:00
|
|
|
lib.mkEnableOption "MPD user service.";
|
2024-04-17 22:39:00 -04:00
|
|
|
alyraffauf.services.mpd.musicDirectory = lib.mkOption {
|
2024-04-14 14:06:38 -04:00
|
|
|
description = "Name of music directory";
|
|
|
|
default = config.xdg.userDirs.music;
|
|
|
|
type = lib.types.str;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-04-17 22:39:00 -04:00
|
|
|
config = lib.mkIf config.alyraffauf.services.mpd.enable {
|
2024-04-14 14:06:38 -04:00
|
|
|
services.mpd = {
|
|
|
|
enable = true;
|
2024-04-17 22:39:00 -04:00
|
|
|
musicDirectory = config.alyraffauf.services.mpd.musicDirectory;
|
2024-04-14 14:06:38 -04:00
|
|
|
};
|
|
|
|
services.mpd-mpris = {
|
|
|
|
enable = true;
|
|
|
|
mpd.port = config.services.mpd.network.port;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|