@@ -33199,6 +33199,9 @@ Audio Services
This is a list of symbols naming Shepherd services that this service
will depend on.
+@item @code{environment-variables} (default: @code{()}) (type: list-of-string)
+A list of strings specifying environment variables.
+
@item @code{log-file} (default: @code{"/var/log/mpd/log"}) (type: maybe-string)
The location of the log file. Set to @code{syslog} to use the local
syslog daemon or @code{%unset-value} to omit this directive from the
@@ -316,6 +316,11 @@ (define-configuration mpd-configuration
will depend on."
empty-serializer)
+ (environment-variables
+ (list-of-string '())
+ "A list of strings specifying environment variables."
+ empty-serializer)
+
(log-file
(maybe-string "/var/log/mpd/log")
"The location of the log file. Set to @code{syslog} to use the
@@ -465,7 +470,8 @@ (define (mpd-log-rotation config)
(define (mpd-shepherd-service config)
(match-record config <mpd-configuration> (user package shepherd-requirement
log-file playlist-directory
- db-file state-file sticker-file)
+ db-file state-file sticker-file
+ environment-variables)
(let* ((config-file (mpd-serialize-configuration config)))
(shepherd-service
(documentation "Run the MPD (Music Player Daemon)")
@@ -490,11 +496,7 @@ (define (mpd-shepherd-service config)
(list #$(file-append package "/bin/mpd")
"--no-daemon"
#$config-file)
- #:environment-variables
- ;; Required to detect PulseAudio when run under a user account.
- (list (string-append
- "XDG_RUNTIME_DIR=/run/user/"
- (number->string (passwd:uid (getpwnam #$user))))))))
+ #:environment-variables '#$environment-variables)))
(stop #~(make-kill-destructor))
(actions
(list (shepherd-configuration-action config-file)