me
/
guix
Archived
1
0
Fork 0

services: mpd: Connect to the user's PulseAudio socket.

* gnu/services/audio.scm (mpd-shepherd-service): Set the XDG_RUNTIME_DIR
environment variable.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
master
Robert Smith 2019-11-05 23:46:46 +01:00 committed by Tobias Geerinckx-Rice
parent 8f61b53efc
commit 970cb5cece
No known key found for this signature in database
GPG Key ID: D889B0F018C5493C
1 changed files with 7 additions and 0 deletions

View File

@ -140,6 +140,13 @@ audio_output {
"--no-daemon"
#$(mpd-config->file config))
#:pid-file #$(mpd-file-name config "pid")
#:environment-variables
;; Required to detect PulseAudio when run under a user account.
'(#$(string-append
"XDG_RUNTIME_DIR=/run/user/"
(number->string
(passwd:uid
(getpwnam (mpd-configuration-user config))))))
#:log-file #$(mpd-file-name config "log")))
(stop #~(make-kill-destructor))))