[Nix-dev] Setting proxy environmental variables
Wout Mertens
wout.mertens at gmail.com
Thu Nov 27 22:57:29 CET 2014
On Thu Nov 27 2014 at 10:29:14 PM Edward Tjörnhammar <ed at cflags.cc> wrote:
> On Thu, Nov 27, 2014 at 06:19:47PM +0000, Wout Mertens wrote:
> > Ok, try this:
> >
> > * configure nix.proxy like it should be in
> /etc/nixos/configuration.nix
> > * build the new nix.conf:A sudo nix-build '<nixpkgs/nixos>' -A
> > config.environment.etc.\"nix/nix.conf\".source
> > * overwrite nix.conf: sudo mv result /etc/nix/nix.conf
> > * 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.
Wout.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141127/4dfae691/attachment.html
More information about the nix-dev
mailing list