[Nix-dev] Setting proxy environmental variables
Wout Mertens
wout.mertens at gmail.com
Sun Nov 23 23:20:24 CET 2014
Hi,
see https://github.com/NixOS/nixpkgs/pull/5058 for the work being done for
this. In the mean time, can't you set http_proxy environment variables
before running nixos-rebuild?
Wout.
On Fri Nov 21 2014 at 3:26:43 PM masterdeZign <masterdezign at gmail.com>
wrote:
> Hello!
>
> I am new to NixOs, but the question which interests me seems not to be
> discussed yet.
> My workstation has access to Internet via proxy. I have exported
> environmental variables http_proxy and https_proxy, however running
> nix-env -i wget fails accessing cache.nixos.org and subsequently,
> tarballs.nixos.org. I suspect it's due to the fact the build users do
> not share the environmental variables with my current user.
>
> Looking around the manual, I have found nix.proxy configuration
> string. I have ended up with a /etc/nixos/configuration.nix like that:
>
> { config, pkgs, ... }:
>
> {
> imports = [ <nixos/modules/installer/virtualbox-demo.nix>
> <nixpkgs/nixos/modules/services/misc/nix-daemon.nix>
> ];
>
> nix.proxy = "proxy-host.com:3128";
>
> }
>
> However nixos-rebuild switch fails in the same way as nix-env -i:
>
> building Nix...
> building the system configuration...
> download-from-binary-cache.pl: still waiting for
> ‘http://cache.nixos.org/nix-cache-info’ after 5 seconds...
> download-from-binary-cache.pl: could not download
> ‘http://cache.nixos.org/nix-cache-info’ (Curl error 7)
> these derivations will be built:
> /nix/store/17s184bdsmnqa0vpwxmyj58i3a2n8flz-dbus-conf.drv
> /nix/store/2jwpim2m9f4yhi1ds0rqqcl6h623v0b5-stdenv.drv
> /nix/store/3xbm6viqjdpznhxxxqpsirlfjz0b64lw-bzip2.drv
> ...
> /nix/store/zw9nnsyygzz72j5b3j5zw4bknzkcbcdf-docbook-5.0.zip.drv
> building path(s) `/nix/store/4fxls0b5l7c3kdd8idbzr6cp823iip37-bzip2'
> downloading http://tarballs.nixos.org/stdenv-linux/i686/r24519/bzip2
> into /nix/store/4fxls0b5l7c3kdd8idbzr6cp823iip37-bzip2
> % Total % Received % Xferd Average Speed Time Time Time
> Current
> Dload Upload Total Spent Left
> Speed
> 0 0 0 0 0 0 0 0 --:--:-- 0:02:07 --:--:--
>
>
>
> Thank you in advance.
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141123/895616da/attachment.html
More information about the nix-dev
mailing list