From 637a9c3b264fe8eb76b6ed9f104b635d95632be6 Mon Sep 17 00:00:00 2001 From: Bruno Victal Date: Thu, 2 Feb 2023 20:07:38 +0000 Subject: services: mpd: Do not hardcode environment variables. Services should not expect for XDG_RUNTIME_DIR to be set. Inferring from the past comment, this seemed to resolve an issue when the service was launched with an _interactive_ user-account, which tends to have this variable set by the login-manager. This is not the case for system accounts and setting this variable results in PulseAudio (launched by the same system user) failing to start since it attempts to use a nonexistent directory. Ideally, this service should have a home-service counterpart but the old behavior can be emulated by setting the environment-variables field to: (environment-variables (list (string-append "XDG_RUNTIME_DIR=/run/user/" (number->string (passwd:uid (getpwnam "myuser")))))) * gnu/services/audio.scm (mpd-configuration)[environment-variables]: New field. (mpd-shepherd-service)[start]: Use new field. * doc/guix.texi (Audio Services)[Music Player Daemon]: Document it. Signed-off-by: Liliana Marie Prikler --- doc/guix.texi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index cd18959db0..e7d56f2504 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33199,6 +33199,9 @@ The group to run mpd as. 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 -- cgit v1.2.3