nixos/modules/home/music/mpd.nix

31 lines
573 B
Nix
Raw Normal View History

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