diff options
author | Sergio Pastor Pérez <sergio.pastorperez@outlook.es> | 2024-08-11 00:40:26 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-08-28 16:37:32 +0200 |
commit | ebe00a20e2aea189b5c59d0550fd75ab58443ff8 (patch) | |
tree | 5e7977edb248a6d1f4220317236289bde168d758 | |
parent | 1fb4c399ea14aeeaa559bdd600da77ed2869c43b (diff) | |
download | guix-ebe00a20e2aea189b5c59d0550fd75ab58443ff8.tar guix-ebe00a20e2aea189b5c59d0550fd75ab58443ff8.tar.gz |
services: mcron: Fix home version not respecting user PATH variable.
Without this fix, deploying `home-mcron-service-type' will strip user's PATH
variable from it's environment. This means that, programs such as `notmuch',
which use hooks which usually invoke `notmuch' from path, would need to be
updated with full paths; which makes it very inconvenient to use.
* gnu/services/mcron.scm (mcron-shepherd-services): respect user PATH variable.
Change-Id: I104aa0a818ad6c3266b2b8f73a9609bfb36e314d
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r-- | gnu/services/mcron.scm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gnu/services/mcron.scm b/gnu/services/mcron.scm index e907d364da..0e0d07d252 100644 --- a/gnu/services/mcron.scm +++ b/gnu/services/mcron.scm @@ -182,9 +182,12 @@ files." ;; set a sane value for 'PATH'. #:environment-variables (cons* "GUILE_AUTO_COMPILE=0" - "PATH=/run/current-system/profile/bin" - (remove (cut string-prefix? "PATH=" <>) - (environ))) + #$(if home-service? + '(environ) + '(cons* + "PATH=/run/current-system/profile/bin" + (remove (cut string-prefix? "PATH=" <>) + (environ))))) #:log-file #$log-file)) (stop #~(make-kill-destructor)) |