From ebe00a20e2aea189b5c59d0550fd75ab58443ff8 Mon Sep 17 00:00:00 2001 From: Sergio Pastor Pérez Date: Sun, 11 Aug 2024 00:40:26 +0200 Subject: services: mcron: Fix home version not respecting user PATH variable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- gnu/services/mcron.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gnu/services') 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)) -- cgit v1.2.3