mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
e6ce041cae
By adding prompts and replaceables and removing unnecessary indentation.
49 lines
1.6 KiB
XML
49 lines
1.6 KiB
XML
<section xmlns="http://docbook.org/ns/docbook"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
version="5.0"
|
|
xml:id="sec-installing-behind-proxy">
|
|
<title>Installing behind a proxy</title>
|
|
|
|
<para>
|
|
To install NixOS behind a proxy, do the following before running
|
|
<literal>nixos-install</literal>.
|
|
</para>
|
|
|
|
<orderedlist numeration="arabic">
|
|
<listitem>
|
|
<para>
|
|
Update proxy configuration in
|
|
<literal>/mnt/etc/nixos/configuration.nix</literal> to keep the internet
|
|
accessible after reboot.
|
|
</para>
|
|
<programlisting>
|
|
networking.proxy.default = "http://user:password@proxy:port/";
|
|
networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
</programlisting>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Setup the proxy environment variables in the shell where you are running
|
|
<literal>nixos-install</literal>.
|
|
</para>
|
|
<screen>
|
|
<prompt># </prompt>proxy_url="http://user:password@proxy:port/"
|
|
<prompt># </prompt>export http_proxy="$proxy_url"
|
|
<prompt># </prompt>export HTTP_PROXY="$proxy_url"
|
|
<prompt># </prompt>export https_proxy="$proxy_url"
|
|
<prompt># </prompt>export HTTPS_PROXY="$proxy_url"
|
|
</screen>
|
|
</listitem>
|
|
</orderedlist>
|
|
|
|
<note>
|
|
<para>
|
|
If you are switching networks with different proxy configurations, use the
|
|
<literal>specialisation</literal> option in
|
|
<literal>configuration.nix</literal> to switch proxies at runtime. Refer to
|
|
<xref linkend="ch-options" /> for more information.
|
|
</para>
|
|
</note>
|
|
</section>
|