[NixOS] MPD / MPC aren't working

Hello, it is me again, now I am trying to make MPD work. So I enabled the MPD service and installed MPC, but doing mpc play gave me that strange error :
ERROR: Failed to enable output "default detected output" (jack); Failed to connect to JACK server, status=17
I actually have sound and pulseaudio enabled in the NixOS configuration, and don’t use any JACK device, what a strange error …

Searching in the Arch Wiki, I tried to specify my device by using the output of aplay --list-pcm in the mpd config as name, it always threw me MPD error: Connection refused.
Still searching in the Arch Wiki, I found this, so I added pulseaudio.extraConfig = "load-module module-native-protocol-tcp auth-ip-acl="; in my config and

audio_output = {
type “pulse”
name “Local Music Player Daemon”
server “”

in the mpd config (just added the server line). And I still got this “Connection Error” message.

Any idea ?


What’s the output of:

$ find /run/current-system/sw/ -name '*jack*'


Also, may be helpful:

$ aplay --list-pcm
$ pacmd list-modules
$ pacmd list-cards

And what’s the output of sudo journalctl mpd.service when you run mpc play

1 Like

Hello, thanks for answering, but you are too late, I fixed it.

Summing up : I have no idea why it doesn’t work with pulseaudio. Whatever, I just tried to make it work with alsa.
What I actually thought was that it was really strange that mpd tried to connect to some jack device, I don’t use any. So maybe it is just that it is taking the bad default sound device ?
I was right with that, but my problem was that I thought the “name” section in the config point to the device and “device” is just a more complicated way to point to it. Finally I understood that name didnt change anything. I now tried using “device” with differents devices listed with aplay --list-pcm (got that from the Arch Wiki) which says “speaker”. And … finally works.

Thanks for the help anyway !