Hi, I’ve been trying to use MPD with rmpc, but it doesn’t seem to work properly, even though MPD appears to be running fine as a service. Here’s the output of systemctl status mpd
:
[thomas@balian:~]$ systemctl status mpd
● mpd.service - Music Player Daemon
Loaded: loaded (/etc/systemd/system/mpd.service; linked; preset: ignored)
Drop-In: /nix/store/vc4rcs019vhw7n101vvz1apiqkd030ln-system-units/mpd.service.d
└─overrides.conf
Active: active (running) since Mon 2025-06-09 21:35:53 CEST; 5min ago
Invocation: 648e9707eec54a33adff08ca52f6480c
TriggeredBy: ● mpd.socket
Docs: man:mpd(1)
man:mpd.conf(5)
Process: 9931 ExecStartPre=/nix/store/j20lvfd7ck8p94fp93d41r3pp5gdbyi5-unit-script-mpd-pre-start/bin/mpd-pre-start (code=exited, status=0/SUCCESS)
Main PID: 9936 (mpd)
IP: 0B in, 0B out
IO: 308K read, 4K written
Tasks: 3 (limit: 18771)
Memory: 9.6M (peak: 10M)
CPU: 153ms
CGroup: /system.slice/mpd.service
└─9936 /nix/store/fznic5xxcm58azmmxshkzm3szvnaya85-mpd-0.24.4/bin/mpd --systemd /run/mpd/mpd.conf
juin 09 21:35:53 balian systemd[1]: Starting Music Player Daemon...
juin 09 21:35:53 balian mpd[9936]: zeroconf: No global port, disabling zeroconf
juin 09 21:35:53 balian systemd[1]: Started Music Player Daemon.
When I try to update the database using mpc update
or directly via rmpc with the “u” key, it doesn’t seem to work. However, I can see that the PipeWire output is recognized because I can toggle it in rmpc.
Here’s my configuration.nix
:
services.mpd = {
enable = true;
musicDirectory = "${config.users.users.${username}.home}/Music";
user = username;
extraConfig = ''
audio_output {
type "pipewire"
name "PipeWire Sound Server"
}
'';
startWhenNeeded = true;
};
environment.systemPackages = with pkgs; [
mpc
mpd
];
systemd.services.mpd.environment = {
# https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609
# User-id must match above user. MPD will look inside this directory for the PipeWire socket.
XDG_RUNTIME_DIR = "/run/user/${toString config.users.users.${username}.uid}";
};
One thing I’ve noticed is that there is no mpd.conf
generated in either /etc/mpd.conf
or .config/mpd/mpd.conf
.
Has anyone encountered similar issues or have suggestions on what could be going wrong?