summaryrefslogtreecommitdiff
path: root/gnu/services/shepherd.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-03-04 23:16:17 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-03-04 23:16:17 +0100
commitebb7cf9e21060105d9950dd5142c0eb918083666 (patch)
tree36c1607b80d92e27fb9d09029d1d3b57a1fd5065 /gnu/services/shepherd.scm
parent0b870f7915f5da43758753fd088a22033936dc50 (diff)
parentc2d7e800e6788277bc56f31d5836f9d507dc1506 (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/services/shepherd.scm')
-rw-r--r--gnu/services/shepherd.scm12
1 files changed, 7 insertions, 5 deletions
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index 08bb33039c..d483ff1a15 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2018 Carlo Zancanaro <carlo@zancanaro.id.au>
;;;
@@ -281,6 +281,12 @@ and return the resulting '.go' file."
(use-modules (srfi srfi-34)
(system repl error-handling))
+ ;; Specify the default environment visible to all the services.
+ ;; Without this statement, all the environment variables of PID 1
+ ;; are inherited by child services.
+ (default-environment-variables
+ '("PATH=/run/current-system/profile/bin"))
+
;; Arrange to spawn a REPL if something goes wrong. This is better
;; than a kernel panic.
(call-with-error-handling
@@ -288,10 +294,6 @@ and return the resulting '.go' file."
(apply register-services
(map load-compiled '#$(map scm->go files)))))
- ;; guix-daemon 0.6 aborts if 'PATH' is undefined, so work around
- ;; it.
- (setenv "PATH" "/run/current-system/profile/bin")
-
(format #t "starting services...~%")
(for-each (lambda (service)
;; In the Shepherd 0.3 the 'start' method can raise