diff options
author | Bobby Rong <rjl931189261@126.com> | 2021-07-02 22:52:47 +0800 |
---|---|---|
committer | Bobby Rong <rjl931189261@126.com> | 2021-07-02 22:52:47 +0800 |
commit | 445e922b5bdc104b9797fc2bd58a243d3b942572 (patch) | |
tree | 207c73c8c44480eb3a24e53967039983a1c67c95 | |
parent | 060684efa1485ee5745cd9077d8cd4953f3da0c5 (diff) | |
download | nixpkgs-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
4 files changed, 71 insertions, 49 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 = "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> + <programlisting> +# proxy_url="http://user:password@proxy:port/" +# export http_proxy="$proxy_url" +# export HTTP_PROXY="$proxy_url" +# export https_proxy="$proxy_url" +# export HTTPS_PROXY="$proxy_url" +</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> diff --git a/nixos/doc/manual/installation/installing-behind-a-proxy.section.md b/nixos/doc/manual/installation/installing-behind-a-proxy.section.md new file mode 100644 index 00000000000..aca151531d0 --- /dev/null +++ b/nixos/doc/manual/installation/installing-behind-a-proxy.section.md @@ -0,0 +1,29 @@ +# Installing behind a proxy {#sec-installing-behind-proxy} + +To install NixOS behind a proxy, do the following before running +`nixos-install`. + +1. Update proxy configuration in `/mnt/etc/nixos/configuration.nix` to + keep the internet accessible after reboot. + + ```nix + networking.proxy.default = "http://user:password@proxy:port/"; + networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + ``` + +1. Setup the proxy environment variables in the shell where you are + running `nixos-install`. + + ```ShellSession + # proxy_url="http://user:password@proxy:port/" + # export http_proxy="$proxy_url" + # export HTTP_PROXY="$proxy_url" + # export https_proxy="$proxy_url" + # export HTTPS_PROXY="$proxy_url" + ``` + +::: {.note} +If you are switching networks with different proxy configurations, use +the `specialisation` option in `configuration.nix` to switch proxies at +runtime. Refer to [](#ch-options) for more information. +::: diff --git a/nixos/doc/manual/installation/installing-behind-a-proxy.xml b/nixos/doc/manual/installation/installing-behind-a-proxy.xml deleted file mode 100644 index 6788882aa8c..00000000000 --- a/nixos/doc/manual/installation/installing-behind-a-proxy.xml +++ /dev/null @@ -1,48 +0,0 @@ -<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> diff --git a/nixos/doc/manual/installation/installing.xml b/nixos/doc/manual/installation/installing.xml index 4f7db8bc607..49c68c616be 100644 --- a/nixos/doc/manual/installation/installing.xml +++ b/nixos/doc/manual/installation/installing.xml @@ -574,6 +574,6 @@ Retype new UNIX password: ***</screen> <xi:include href="../from_md/installation/installing-from-other-distro.section.xml" /> - <xi:include href="installing-behind-a-proxy.xml" /> + <xi:include href="../from_md/installation/installing-behind-a-proxy.section.xml" /> </section> </chapter> |