mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 21:23:55 -05:00
28 lines
590 B
Nix
28 lines
590 B
Nix
|
{
|
||
|
pkgs,
|
||
|
lib,
|
||
|
config,
|
||
|
...
|
||
|
}: {
|
||
|
options = {
|
||
|
userServices.mpd.enable =
|
||
|
lib.mkEnableOption "MPD user service.";
|
||
|
userServices.mpd.musicDirectory = lib.mkOption {
|
||
|
description = "Name of music directory";
|
||
|
default = config.xdg.userDirs.music;
|
||
|
type = lib.types.str;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = lib.mkIf config.userServices.mpd.enable {
|
||
|
services.mpd = {
|
||
|
enable = true;
|
||
|
musicDirectory = config.userServices.mpd.musicDirectory;
|
||
|
};
|
||
|
services.mpd-mpris = {
|
||
|
enable = true;
|
||
|
mpd.port = config.services.mpd.network.port;
|
||
|
};
|
||
|
};
|
||
|
}
|