nix-infra/modules/services/audio/mpd.nix
June c96486aa91
Let MPD mix the audio itself to work around PW/WP restore bug
jtbx discovered that MPD is using the Pipewire stream volume for volume
control, but that when Pipewire/Wireplumber restores the stream volumes
on restart, it wrongly assigns the MPD stream volume to the Shaireport
Sync stream as well.
Work around that bug by making MPD mix itself and not through
Pipewire/Wireplumber.
2024-04-27 23:28:31 +02:00

35 lines
555 B
Nix

# Links & Resources:
# - https://mpd.readthedocs.io/en/stable/user.html
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.ccchh.services.audio;
in
{
config = mkIf cfg.enable {
services.mpd = {
enable = true;
network.listenAddress = "any";
extraConfig = ''
audio_output {
type "pipewire"
name "Pipewire"
mixer_type "software"
}
'';
};
users.users.mpd.extraGroups = [ "pipewire" ];
networking.firewall = {
allowedTCPPorts = [ 6600 ];
};
};
}