2024-05-18 20:55:04 +02:00
|
|
|
{
|
|
|
|
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;
|
2024-05-18 21:20:50 +02:00
|
|
|
musicDirectory = "${config.home.homeDirectory}/Music/";
|
2024-05-18 20:55:04 +02:00
|
|
|
network.startWhenNeeded = true;
|
|
|
|
extraConfig = ''
|
|
|
|
restore_paused "yes"
|
|
|
|
auto_update "yes"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
services.mpd-mpris.enable = true;
|
|
|
|
services.mpdris2.enable = true;
|
2024-03-09 10:57:55 +01:00
|
|
|
};
|
|
|
|
}
|