From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Lirzin Subject: bug#25831: Expose http_proxy setting on GuixSD Date: Tue, 21 Feb 2017 19:17:03 +0100 Message-ID: <87efyrwgrk.fsf@gnu.org> References: <20170221171912.GB1656@jasmine> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgF0l-0001we-MY for bug-guix@gnu.org; Tue, 21 Feb 2017 13:18:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgF0k-00047u-Il for bug-guix@gnu.org; Tue, 21 Feb 2017 13:18:03 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:50999) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cgF0k-00047p-El for bug-guix@gnu.org; Tue, 21 Feb 2017 13:18:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cgF0k-0007dW-9p for bug-guix@gnu.org; Tue, 21 Feb 2017 13:18:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20170221171912.GB1656@jasmine> (Leo Famulari's message of "Tue, 21 Feb 2017 12:19:12 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Leo Famulari Cc: 25831@debbugs.gnu.org Hello, Leo Famulari writes: > From: ng0 > Subject: Re: Proxy documentation is not clear > To: Leo Famulari > Cc: help-guix@gnu.org > Date: Tue, 21 Feb 2017 09:43:35 +0000 (8 hours, 8 minutes, 14 seconds ago) > > On 17-02-20 22:32:40, Leo Famulari wrote: >> On Sun, Feb 19, 2017 at 05:06:23PM +0000, ng0 wrote: >> > Substitutes are downloaded over HTTP or HTTPS. The http_proxy >> > environment variable can be set in the environment of guix-daemon and >> > is honored for downloads of substitutes. Note that the value of >> > http_proxy in the environment where guix build, guix package, and >> > other client commands are run has absolutely no effect. >> > >> > None of these pages provides any example or further explanation on how >> > this could be achieved, for example to make Guix use a socks5 proxy >> > systemwide. I know how this can be achieved with iptables etc, but it >> > would be better if the documentation is fixed. I have no idea how in >> > this case as the documentation is not clear. >> >> It depends on how you start the daemon. For systemd, you can set the >> environment variable from the service file. I'm not sure how to pass >> this variable to the daemon on GuixSD. > > Exactly, for systemd I would have been able to find it out, but I wonder > how to achieve this in GuixSD. > > ---------- > Not sure if this is an appropriate answer, but to customize the guix daemon service field like described in the example here: https://www.gnu.org/software/guix/manual/html_node/Using-the-Configuration-System.html#System-Services you would have to patch "gnu/services/base.scm" by adding a field to the 'guix-configuration' that would be then be passed to the '#:environment-variables' option of 'make-forkexec-constructor' in 'guix-shepherd-service'. HTH. -- Mathieu Lirzin GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37