guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: services: nar-herder: Support extra environment v


From: guix-commits
Subject: branch master updated: services: nar-herder: Support extra environment vars.
Date: Sat, 13 May 2023 06:28:06 -0400

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 9a6bbea9d4 services: nar-herder: Support extra environment vars.
9a6bbea9d4 is described below

commit 9a6bbea9d400a916d95e22c6ea2377fa0cb13dc0
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sat May 13 11:23:48 2023 +0100

    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.
---
 doc/guix.texi         |  3 +++
 gnu/services/guix.scm | 12 +++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 09763d86ab..60972f408d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -37803,6 +37803,9 @@ Number of cached nars to generate at a time.
 Location to fetch nars from when computing cached compressions.  By
 default, the storage location will be used.
 
+@item @code{extra-environment-variables} (default: @code{'()})
+Extra environment variables to set via the shepherd service.
+
 @end table
 @end deftp
 
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))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]