[Nix-dev] Setting proxy environmental variables

Edward Tjörnhammar ed at cflags.cc
Thu Nov 27 22:29:11 CET 2014


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)

>    Wout.
>    On Thu Nov 27 2014 at 2:13:03 PM masterdeZign <masterdezign at gmail.com>
>    wrote:
>
>      > You should only need to do a
>      >
>      >A  A  A 4) nix-build -A system "<nixos>" --option use-binary-caches
>      false
>
>      This step seems to require root privileges, because of "error: Nix
>      database directory `/nix/var/nix/db' is not writable: Permission
>      denied".
>
>      However, it is not a problem. I use sudo -E or sudo su + export the
>      http_proxy and https_proxy variables. But the problem persists,
>      because curl does not download anything.

I created a wiki page for this, since it seems to be needed.

http://nixos.org/wiki/Proxies

>      _______________________________________________
>      nix-dev mailing list
>      nix-dev at lists.science.uu.nl
>      http://lists.science.uu.nl/mailman/listinfo/nix-dev
-------------- 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/d39d30ec/attachment.bin 


More information about the nix-dev mailing list