[Nix-dev] Setting proxy environmental variables

Edward Tjörnhammar ed at cflags.cc
Thu Nov 27 23:05:25 CET 2014


On Thu, Nov 27, 2014 at 09:57:29PM +0000, Wout Mertens wrote:
>    On Thu Nov 27 2014 at 10:29:14 PM Edward TjAP:rnhammar <ed at cflags.cc>
>    wrote:
>
>      On Thu, Nov 27, 2014 at 06:19:47PM +0000, Wout Mertens wrote:
>      >A  A  Ok, try this:
>      >
>      >A  A  A  * configure nix.proxy like it should be in
>      /etc/nixos/configuration.nix
>      >A  A  A  * build the new nix.conf:A sudo nix-build '<nixpkgs/nixos>' -A
>      >A  A  A  A  config.environment.etc.\"nix/nix.conf\".source
>      >A  A  A  * overwrite nix.conf: sudo mv result /etc/nix/nix.conf
>      >A  A  A  * sudo nixos-rebuild => should work now with the proxy
>      settings
>
>      Will that work? "man nix.conf|grep proxy;echo $?"
>      (nix-1.8pre3903_b0c5c2a)
>
>    Argh, you're right, nix.proxy determines the environment variables for
>    nix-daemon, there's no proxy setting in the nix configuration file :-(
>    So while this will set build options that are defined in the nixos config,
>    it doesn't help with proxying.
>    So it's back to not doing the build with nix-daemon, but as root with the
>    proper proxy variables set. Just sudo -s, set the variables and do a
>    nixos-rebuild.
>    Another option would be to set up iptables to send all http traffic
>    through a transparent proxy but that's probably silly :-D.

Hurr? the localhost privoxy would forward to the intended http_proxy
via its config but that would still imply an activation right?

>    Wout.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141127/0f46fcb2/attachment.bin 


More information about the nix-dev mailing list