{ config, ... }:

{
  # MPD
  services.mpd = {
    enable = true;
    musicDirectory = "${config.xdg.userDirs.music}/MPD";
    extraConfig =
      ''
        audio_output {
          type            "pipewire"
          name            "PipeWire Sound Server"
        }

        audio_output {
          type            "fifo"
          name            "mpd"
          path            "~/.local/share/mpd/.mpd_fifo"
          format          "44100:16:2"
        }
      '';
  };

  services.mpd-mpris.enable = true;
}
