nixos: nixos/doc/manual/configuration/ad-hoc-network-config.xml to CommonMark
This commit is contained in:
parent
54419f6e59
commit
55aa106c0b
@ -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
|
||||||
|
'';
|
||||||
|
```
|
@ -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>
|
|
@ -14,7 +14,7 @@
|
|||||||
<xi:include href="../from_md/configuration/ipv6-config.section.xml" />
|
<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/firewall.section.xml" />
|
||||||
<xi:include href="../from_md/configuration/wireless.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" />
|
<xi:include href="renaming-interfaces.xml" />
|
||||||
<!-- TODO: OpenVPN, NAT -->
|
<!-- TODO: OpenVPN, NAT -->
|
||||||
</chapter>
|
</chapter>
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="ad-hoc-network-config">
|
||||||
|
<title>Ad-Hoc Configuration</title>
|
||||||
|
<para>
|
||||||
|
You can use
|
||||||
|
<link xlink:href="options.html#opt-networking.localCommands"><literal>networking.localCommands</literal></link>
|
||||||
|
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:
|
||||||
|
</para>
|
||||||
|
<programlisting language="bash">
|
||||||
|
networking.localCommands =
|
||||||
|
''
|
||||||
|
ip -6 addr add 2001:610:685:1::1/64 dev eth0
|
||||||
|
'';
|
||||||
|
</programlisting>
|
||||||
|
</section>
|
Loading…
Reference in New Issue
Block a user