summary refs log tree commit diff
path: root/nixos/doc/manual/from_md/installation
diff options
context:
space:
mode:
authorBobby Rong <rjl931189261@126.com>2021-07-02 22:52:47 +0800
committerBobby Rong <rjl931189261@126.com>2021-07-02 22:52:47 +0800
commit445e922b5bdc104b9797fc2bd58a243d3b942572 (patch)
tree207c73c8c44480eb3a24e53967039983a1c67c95 /nixos/doc/manual/from_md/installation
parent060684efa1485ee5745cd9077d8cd4953f3da0c5 (diff)
downloadnixpkgs-445e922b5bdc104b9797fc2bd58a243d3b942572.tar
nixpkgs-445e922b5bdc104b9797fc2bd58a243d3b942572.tar.gz
nixpkgs-445e922b5bdc104b9797fc2bd58a243d3b942572.tar.bz2
nixpkgs-445e922b5bdc104b9797fc2bd58a243d3b942572.tar.lz
nixpkgs-445e922b5bdc104b9797fc2bd58a243d3b942572.tar.xz
nixpkgs-445e922b5bdc104b9797fc2bd58a243d3b942572.tar.zst
nixpkgs-445e922b5bdc104b9797fc2bd58a243d3b942572.zip
nixos: nixos/doc/manual/installation/installing-behind-a-proxy.xml to CommonMark
Diffstat (limited to 'nixos/doc/manual/from_md/installation')
-rw-r--r--nixos/doc/manual/from_md/installation/installing-behind-a-proxy.section.xml41
1 files changed, 41 insertions, 0 deletions
diff --git a/nixos/doc/manual/from_md/installation/installing-behind-a-proxy.section.xml b/nixos/doc/manual/from_md/installation/installing-behind-a-proxy.section.xml
new file mode 100644
index 00000000000..a551807cd47
--- /dev/null
+++ b/nixos/doc/manual/from_md/installation/installing-behind-a-proxy.section.xml
@@ -0,0 +1,41 @@
+<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" 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 language="bash">
+networking.proxy.default = &quot;http://user:password@proxy:port/&quot;;
+networking.proxy.noProxy = &quot;127.0.0.1,localhost,internal.domain&quot;;
+</programlisting>
+    </listitem>
+    <listitem>
+      <para>
+        Setup the proxy environment variables in the shell where you are
+        running <literal>nixos-install</literal>.
+      </para>
+      <programlisting>
+# proxy_url=&quot;http://user:password@proxy:port/&quot;
+# export http_proxy=&quot;$proxy_url&quot;
+# export HTTP_PROXY=&quot;$proxy_url&quot;
+# export https_proxy=&quot;$proxy_url&quot;
+# export HTTPS_PROXY=&quot;$proxy_url&quot;
+</programlisting>
+    </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>