Hello everyone. I’m new to NixOS and I’m trying to get the
squeezelite module to work, but it seems to fail to connect to pulseaudio. Here is my configuration:
sound.enable = true; hardware.pulseaudio.enable = true; nixpkgs.config.pulseaudio = true; services.squeezelite.enable = true; services.squeezelite.pulseAudio = true; services.squeezelite.extraArguments = '' -s myserver '';
And here is the error I get when I rebuild my system:
Nov 19 18:15:29 ev-nixos systemd: Started Software Squeezebox emulator. Nov 19 18:15:29 ev-nixos squeezelite-pulse: Failed to create secure directory (//.config/pulse): No such file or directory Nov 19 18:15:29 ev-nixos squeezelite-pulse: [18:15:29.260327] pulse_connection_init:140 failed to connect to PulseAudio server: Connection refused Nov 19 18:15:29 ev-nixos systemd: squeezelite.service: Main process exited, code=exited, status=1/FAILURE Nov 19 18:15:29 ev-nixos systemd: squeezelite.service: Failed with result 'exit-code'.
I have the feeling that this is due to the fact that the systemd service runs with a dynamic user, whose homedir is not writable, much like what is described in this issue: Spotifyd service doesn't work · Issue #71362 · NixOS/nixpkgs · GitHub
I’m not sure what to do. Does anyone have any ideas? Thanks a lot!