From 93d32da9f8bba815b1effe6358904b5e1f9c73ff Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Tue, 21 Feb 2017 14:57:02 -0500 Subject: services: guix: Support using an HTTP proxy. * gnu/services/base.scm ()[http-proxy]: New field. (guix-shepherd-service): Use 'http-proxy' in #:environment-variables. * doc/guix.texi (Base Services)[guix-configuration]: Document it. --- gnu/services/base.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gnu/services/base.scm') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 57601eab85..0fb7bd721c 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2015, 2016 Alex Kost ;;; Copyright © 2015, 2016 Mark H Weaver ;;; Copyright © 2015 Sou Bunnbu -;;; Copyright © 2016 Leo Famulari +;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2016 David Craven ;;; Copyright © 2016 Ricardo Wurmus ;;; @@ -1114,7 +1114,9 @@ (define-record-type* (log-file guix-configuration-log-file ;string (default "/var/log/guix-daemon.log")) (lsof guix-configuration-lsof ; - (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 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))))))) -- cgit v1.2.3