vuls: init at 0.27.0
[NixPkgs.git] / nixos / doc / manual / installation / installing-behind-a-proxy.section.md
blob691f9c9ccf6dd0274cd0bfd7723f019f4fa048c8
1 # Installing behind a proxy {#sec-installing-behind-proxy}
3 To install NixOS behind a proxy, do the following before running
4 `nixos-install`.
6 1.  Update proxy configuration in `/mnt/etc/nixos/configuration.nix` to
7     keep the internet accessible after reboot.
9     ```nix
10     {
11       networking.proxy.default = "http://user:password@proxy:port/";
12       networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
13     }
14     ```
16 1.  Setup the proxy environment variables in the shell where you are
17     running `nixos-install`.
19     ```ShellSession
20     # proxy_url="http://user:password@proxy:port/"
21     # export http_proxy="$proxy_url"
22     # export HTTP_PROXY="$proxy_url"
23     # export https_proxy="$proxy_url"
24     # export HTTPS_PROXY="$proxy_url"
25     ```
27 ::: {.note}
28 If you are switching networks with different proxy configurations, use
29 the `specialisation` option in `configuration.nix` to switch proxies at
30 runtime. Refer to [](#ch-options) for more information.
31 :::