me
/
guix
Archived
1
0
Fork 0

services: mpd: Do not eagerly look for a user.

Running 'guix system search mpd' would throw a backtrace because the
mpd-shepherd-service service start Gexp contained an unquoted call to
'getpwnam', which would look for a missing 'mpd' user and fail.

* gnu/services/audio.scm (mpd-shepherd-service): gexp-unquote only the
relevant variable rather than the whole expression.
master
Maxim Cournoyer 2020-11-06 08:54:27 -05:00
parent 51916455d0
commit 0c5d0c57d3
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 4 additions and 4 deletions

View File

@ -143,11 +143,11 @@ audio_output {
#: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
(list (string-append
"XDG_RUNTIME_DIR=/run/user/"
(number->string
(passwd:uid
(getpwnam (mpd-configuration-user config))))))
(getpwnam #$(mpd-configuration-user config))))))
#:log-file #$(mpd-file-name config "log")))
(stop #~(make-kill-destructor))))