I’m having a hard time configuring a Mopidy service on my Raspberry Pi 3B+ with PipeWire. I can get almost everything to work, but when I play something journalctl shows me:
Dec 25 19:09:56 nixos mopidy[733]: INFO 2024-12-25 19:09:56,747 [733:MainThread] mopidy.commands
Dec 25 19:09:56 nixos mopidy[733]: Starting GLib mainloop
Dec 25 19:12:35 nixos mopidy[733]: [ALSOFT] (EE) Failed to connect PipeWire event context (errno: 112)
Dec 25 19:12:35 nixos mopidy[733]: WARNING 2024-12-25 19:12:35,910 [733:MainThread] mopidy.audio.gst
Dec 25 19:12:35 nixos mopidy[733]: GStreamer warning: Failed to connect: Connection refused
and if I run mopidy
inside my user shell session, everything works fine.
I imagine this has something to do with PipeWire (or WirePlumber) not starting for the mopidy
user created for the service, or it not having access to it somehow? Mopidy docs states that this is a problem with PulseAudio, but I couldn’t find an equivalent (and Nix-like) solution for PipeWire (and it would be nice to not have to configure extra things for my user like this).
I also tried following the NixOS Wiki on PipeWire Headless operation, but it didn’t seem to be enough…