mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
services: guix: Support using an HTTP proxy.
* gnu/services/base.scm (<guix-configuration>)[http-proxy]: New field. (guix-shepherd-service): Use 'http-proxy' in #:environment-variables. * doc/guix.texi (Base Services)[guix-configuration]: Document it.
This commit is contained in:
parent
8923441951
commit
93d32da9f8
2 changed files with 13 additions and 4 deletions
|
@ -8611,6 +8611,10 @@ are written.
|
|||
@item @code{lsof} (default: @var{lsof})
|
||||
The lsof package to use.
|
||||
|
||||
@item @code{http-proxy} (default: @code{#f})
|
||||
The HTTP proxy used for downloading fixed-output derivations and
|
||||
substitutes.
|
||||
|
||||
@end table
|
||||
@end deftp
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
|
||||
;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
|
||||
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
|
||||
;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
|
||||
;;; Copyright © 2016 David Craven <david@craven.ch>
|
||||
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;;
|
||||
|
@ -1114,7 +1114,9 @@ (define-record-type* <guix-configuration>
|
|||
(log-file guix-configuration-log-file ;string
|
||||
(default "/var/log/guix-daemon.log"))
|
||||
(lsof guix-configuration-lsof ;<package>
|
||||
(default lsof)))
|
||||
(default lsof))
|
||||
(http-proxy guix-http-proxy ;string | #f
|
||||
(default #f)))
|
||||
|
||||
(define %default-guix-configuration
|
||||
(guix-configuration))
|
||||
|
@ -1125,7 +1127,7 @@ (define (guix-shepherd-service config)
|
|||
(($ <guix-configuration> guix build-group build-accounts
|
||||
authorize-key? keys
|
||||
use-substitutes? substitute-urls extra-options
|
||||
log-file lsof)
|
||||
log-file lsof http-proxy)
|
||||
(list (shepherd-service
|
||||
(documentation "Run the Guix daemon.")
|
||||
(provision '(guix-daemon))
|
||||
|
@ -1142,7 +1144,10 @@ (define (guix-shepherd-service config)
|
|||
|
||||
;; Add 'lsof' (for the GC) to the daemon's $PATH.
|
||||
#:environment-variables
|
||||
(list (string-append "PATH=" #$lsof "/bin"))
|
||||
(list (string-append "PATH=" #$lsof "/bin")
|
||||
#$@(if http-proxy
|
||||
(list (string-append "http_proxy=" http-proxy))
|
||||
'()))
|
||||
|
||||
#:log-file #$log-file))
|
||||
(stop #~(make-kill-destructor)))))))
|
||||
|
|
Loading…
Reference in a new issue