config/modules/home/services/mpd/default.nix
2025-05-28 17:04:41 -04:00

27 lines
501 B
Nix

{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.services.music;
in {
options.services.music = with types; {
enable = mkBoolOpt false "Enable MPD (Music Player Daemon)";
};
config = mkIf (cfg.enable && !pkgs.stdenv.isDarwin) {
services.mpd = {
enable = true;
musicDirectory = "/home/zoey/Music";
extraConfig = ''
audio_output {
type "pipewire"
name "PipeWire Sound Server"
}
'';
};
};
}