31 lines
573 B
Nix
31 lines
573 B
Nix
{
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
cfg = config.music.mpd;
|
|
in {
|
|
options = {
|
|
music.mpd.enable = lib.mkEnableOption "Music Player Daemon";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
home.packages = with pkgs; [
|
|
mpc-cli
|
|
ymuse
|
|
];
|
|
services.mpd = {
|
|
enable = true;
|
|
musicDirectory = "${config.home.homeDirectory}/Music/";
|
|
network.startWhenNeeded = true;
|
|
extraConfig = ''
|
|
restore_paused "yes"
|
|
auto_update "yes"
|
|
'';
|
|
};
|
|
services.mpd-mpris.enable = true;
|
|
services.mpdris2.enable = true;
|
|
};
|
|
}
|