diff options
author | Bobby Rong <rjl931189261@126.com> | 2021-07-01 23:15:04 +0800 |
---|---|---|
committer | Bobby Rong <rjl931189261@126.com> | 2021-07-01 23:15:04 +0800 |
commit | 55aa106c0b7fbb9f50b3bc791749fcb9822bb971 (patch) | |
tree | 84e67541cccfa9fe577e168d7689eaa34bbeb76a /nixos/doc/manual/configuration | |
parent | 54419f6e59c4fa0f39bc0cf367b7d690b9a4d40b (diff) | |
download | nixpkgs-55aa106c0b7fbb9f50b3bc791749fcb9822bb971.tar nixpkgs-55aa106c0b7fbb9f50b3bc791749fcb9822bb971.tar.gz nixpkgs-55aa106c0b7fbb9f50b3bc791749fcb9822bb971.tar.bz2 nixpkgs-55aa106c0b7fbb9f50b3bc791749fcb9822bb971.tar.lz nixpkgs-55aa106c0b7fbb9f50b3bc791749fcb9822bb971.tar.xz nixpkgs-55aa106c0b7fbb9f50b3bc791749fcb9822bb971.tar.zst nixpkgs-55aa106c0b7fbb9f50b3bc791749fcb9822bb971.zip |
nixos: nixos/doc/manual/configuration/ad-hoc-network-config.xml to CommonMark
Diffstat (limited to 'nixos/doc/manual/configuration')
3 files changed, 14 insertions, 21 deletions
diff --git a/nixos/doc/manual/configuration/ad-hoc-network-config.section.md b/nixos/doc/manual/configuration/ad-hoc-network-config.section.md new file mode 100644 index 00000000000..9131f42842b --- /dev/null +++ b/nixos/doc/manual/configuration/ad-hoc-network-config.section.md @@ -0,0 +1,13 @@ +# Ad-Hoc Configuration {#ad-hoc-network-config} + +You can use [`networking.localCommands`](options.html#opt-networking.localCommands) to +specify shell commands to be run at the end of `network-setup.service`. This +is useful for doing network configuration not covered by the existing NixOS +modules. For instance, to statically configure an IPv6 address: + +```nix +networking.localCommands = + '' + ip -6 addr add 2001:610:685:1::1/64 dev eth0 + ''; +``` diff --git a/nixos/doc/manual/configuration/ad-hoc-network-config.xml b/nixos/doc/manual/configuration/ad-hoc-network-config.xml deleted file mode 100644 index 00e595c7cb7..00000000000 --- a/nixos/doc/manual/configuration/ad-hoc-network-config.xml +++ /dev/null @@ -1,20 +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="ad-hoc-network-config"> - <title>Ad-Hoc Configuration</title> - - <para> - You can use <xref linkend="opt-networking.localCommands"/> to specify shell - commands to be run at the end of <literal>network-setup.service</literal>. - This is useful for doing network configuration not covered by the existing - NixOS modules. For instance, to statically configure an IPv6 address: -<programlisting> -<xref linkend="opt-networking.localCommands"/> = - '' - ip -6 addr add 2001:610:685:1::1/64 dev eth0 - ''; -</programlisting> - </para> -</section> diff --git a/nixos/doc/manual/configuration/networking.xml b/nixos/doc/manual/configuration/networking.xml index f5587195f1f..d48536bd48c 100644 --- a/nixos/doc/manual/configuration/networking.xml +++ b/nixos/doc/manual/configuration/networking.xml @@ -14,7 +14,7 @@ <xi:include href="../from_md/configuration/ipv6-config.section.xml" /> <xi:include href="../from_md/configuration/firewall.section.xml" /> <xi:include href="../from_md/configuration/wireless.section.xml" /> - <xi:include href="ad-hoc-network-config.xml" /> + <xi:include href="../from_md/configuration/ad-hoc-network-config.section.xml" /> <xi:include href="renaming-interfaces.xml" /> <!-- TODO: OpenVPN, NAT --> </chapter> |