diff options
author | Bruno Victal <mirai@makinata.eu> | 2023-02-02 20:07:38 +0000 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-02-05 06:56:43 +0100 |
commit | 637a9c3b264fe8eb76b6ed9f104b635d95632be6 (patch) | |
tree | 8b23e81b7735c67fd3b6bc03247e1c4c215e612b /doc | |
parent | 5c5f0fc1135ff15f9c4adfc5f27eadd9a592b5d1 (diff) | |
download | guix-637a9c3b264fe8eb76b6ed9f104b635d95632be6.tar guix-637a9c3b264fe8eb76b6ed9f104b635d95632be6.tar.gz |
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 <liliana.prikler@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/guix.texi | 3 |
1 files changed, 3 insertions, 0 deletions
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 |