guix-commits
[Top][All Lists]
Advanced

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

branch master updated: services: base: Add environment support to guix-c


From: guix-commits
Subject: branch master updated: services: base: Add environment support to guix-configuration.
Date: Mon, 09 Jan 2023 11:18:07 -0500

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

mothacehe pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 8b314efd50 services: base: Add environment support to 
guix-configuration.
8b314efd50 is described below

commit 8b314efd50742a37fc157f623148d3e4e587c09d
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Sat Jan 7 19:12:30 2023 +0100

    services: base: Add environment support to guix-configuration.
    
    * gnu/services/base.scm (<guix-configuration>)[extra-env]: New field.
    (guix-shepherd-service): Honor it.
    * doc/guix.texi (Base Services): Document it.
---
 doc/guix.texi         |  4 ++++
 gnu/services/base.scm | 10 +++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 293c3016aa..695770bd12 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18482,6 +18482,10 @@ herd set-http-proxy guix-daemon
 @item @code{tmpdir} (default: @code{#f})
 A directory path where the @command{guix-daemon} will perform builds.
 
+@item @code{environment} (default: @code{'()})
+Environment variables to be set before starting the daemon, as a list of
+@code{key=value} strings.
+
 @end table
 @end deftp
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 6993e1f174..08eea46dc6 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -198,6 +198,7 @@
             guix-configuration-generate-substitute-key?
             guix-configuration-extra-options
             guix-configuration-log-file
+            guix-configuration-environment
 
             guix-extension
             guix-extension?
@@ -1654,7 +1655,9 @@ archive' public keys, with GUIX."
   (http-proxy       guix-http-proxy               ;string | #f
                     (default #f))
   (tmpdir           guix-tmpdir                   ;string | #f
-                    (default #f)))
+                    (default #f))
+  (environment      guix-configuration-environment  ;list of strings
+                    (default '())))
 
 (define %default-guix-configuration
   (guix-configuration))
@@ -1710,7 +1713,7 @@ proxy of 'guix-daemon'...~%")
     (guix build-group build-accounts authorize-key? authorized-keys
           use-substitutes? substitute-urls max-silent-time timeout
           log-compression discover? extra-options log-file
-          http-proxy tmpdir chroot-directories)
+          http-proxy tmpdir chroot-directories environment)
     (list (shepherd-service
            (documentation "Run the Guix daemon.")
            (provision '(guix-daemon))
@@ -1799,7 +1802,8 @@ proxy of 'guix-daemon'...~%")
                            (if proxy
                                (list (string-append "http_proxy=" proxy)
                                      (string-append "https_proxy=" proxy))
-                               '()))
+                               '())
+                           '#$environment)
 
                    #:log-file #$log-file))))
            (stop #~(make-kill-destructor))))))



reply via email to

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