June
c96486aa91
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.
35 lines
555 B
Nix
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 ];
|
|
};
|
|
};
|
|
}
|