nixos/modules/home/music/mpd.nix

31 lines
591 B
Nix
Raw Normal View History

{
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;
};
}