summary refs log tree commit diff
path: root/gnu/services
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-05-13 11:23:48 +0100
committerChristopher Baines <mail@cbaines.net>2023-05-13 11:26:37 +0100
commit9a6bbea9d400a916d95e22c6ea2377fa0cb13dc0 (patch)
tree573b375f47679c4f2c761d25ca8a8f276f19c1f1 /gnu/services
parentcc47c5277d4aacb7f7cc8538b8c9af5ff3e1a1f9 (diff)
downloadguix-9a6bbea9d400a916d95e22c6ea2377fa0cb13dc0.tar.gz
services: nar-herder: Support extra environment vars.
* gnu/services/guix.scm (nar-herder-configuration-extra-environment-variables):
New procedure.
(nar-herder-shepherd-services): Pass the environment variables to the
shepherd.
* doc/guix.texi (Guix Services): Document it.
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/guix.scm12
1 files changed, 9 insertions, 3 deletions
diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm
index 90310ab9d9..ef77458255 100644
--- a/gnu/services/guix.scm
+++ b/gnu/services/guix.scm
@@ -133,6 +133,7 @@
             nar-herder-configuration-cached-compression-min-uses
             nar-herder-configuration-cached-compression-workers
             nar-herder-configuration-cached-compression-nar-source
+            nar-herder-configuration-extra-environment-variables
 
             nar-herder-cached-compression-configuration
             nar-herder-cached-compression-configuration?
@@ -858,7 +859,10 @@ ca-certificates.crt file in the system profile."
    (default 2))
   (cached-compression-nar-source
    nar-herder-configuration-cached-compression-nar-source
-   (default #f)))
+   (default #f))
+  (extra-environment-variables
+   nar-herder-configuration-extra-environment-variables
+   (default '())))
 
 (define-record-type* <nar-herder-cached-compression-configuration>
   nar-herder-cached-compression-configuration
@@ -906,7 +910,8 @@ ca-certificates.crt file in the system profile."
              storage storage-limit storage-nar-removal-criteria
              ttl negative-ttl log-level
              cached-compressions cached-compression-min-uses
-             cached-compression-workers cached-compression-nar-source)
+             cached-compression-workers cached-compression-nar-source
+             extra-environment-variables)
 
     (unless (or mirror storage)
       (error "nar-herder: mirror or storage must be set"))
@@ -975,7 +980,8 @@ ca-certificates.crt file in the system profile."
                 #:environment-variables
                 `(,(string-append
                     "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale")
-                  "LC_ALL=en_US.utf8")
+                  "LC_ALL=en_US.utf8"
+                  #$@extra-environment-variables)
                 #:log-file "/var/log/nar-herder/server.log"))
       (stop #~(make-kill-destructor))))))