31 lines
591 B
Nix
31 lines
591 B
Nix
{
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
cfg = config.myConfig.music.mpd;
|
|
in {
|
|
options.myConfig.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;
|
|
};
|
|
}
|