nix-community / vagrant-nixos-plugin

Vagrant plugin to add nixos guest capabilities and nix provisioning [maintainer=@zimbatm]
MIT License
68 stars 7 forks source link

Add proxy support for initial provisioning #9

Open Tzrlk opened 8 years ago

Tzrlk commented 8 years ago

When attempting to provision a machine behind a corporate proxy, nixos is unable to connect to the binary cache. It'd be great if the initial rebuild had proxy information available.

zimbatm commented 8 years ago

What kind of proxy are you using ? I never used one with nixos but I believe you could set something like:

{
  networking.proxy.httpProxy = "http://192.168.0.8:8080";
}

If nixos needs internet access to rebuild the config, try to set it in an environment variable to bootstrap:

$ sudo su
$ export http_proxy=http://192.168.0.8:8080
$ nixos-rebuild switch