diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-11-06 08:54:27 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-11-06 08:54:27 -0500 |
commit | 0c5d0c57d370b34f3ba677838deaa8baf7bca58a (patch) | |
tree | 6d3fbf90688371acb273124d3b889c9dfdb34e9e /gnu/services | |
parent | 51916455d0bb283489162ef84afc8145b28b012c (diff) | |
download | guix-0c5d0c57d370b34f3ba677838deaa8baf7bca58a.tar guix-0c5d0c57d370b34f3ba677838deaa8baf7bca58a.tar.gz |
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.
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/audio.scm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 37f2efa479..5d33032501 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -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)))) |