~ruther/guix-local

ebe00a20e2aea189b5c59d0550fd75ab58443ff8 — Sergio Pastor Pérez 1 year, 9 months ago 1fb4c39
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>
1 files changed, 6 insertions(+), 3 deletions(-)

M gnu/services/mcron.scm
M gnu/services/mcron.scm => gnu/services/mcron.scm +6 -3
@@ 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))