mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
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>
This commit is contained in:
parent
8f61b53efc
commit
970cb5cece
1 changed files with 7 additions and 0 deletions
|
@ -140,6 +140,13 @@ (define (mpd-shepherd-service config)
|
||||||
"--no-daemon"
|
"--no-daemon"
|
||||||
#$(mpd-config->file config))
|
#$(mpd-config->file config))
|
||||||
#:pid-file #$(mpd-file-name config "pid")
|
#: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")))
|
#:log-file #$(mpd-file-name config "log")))
|
||||||
(stop #~(make-kill-destructor))))
|
(stop #~(make-kill-destructor))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue