2014-08-24 19:18:18 +02:00
|
|
|
<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">
|
2018-05-02 01:57:09 +02:00
|
|
|
<title>Ad-Hoc Configuration</title>
|
2014-08-24 19:18:18 +02:00
|
|
|
|
2018-05-02 01:57:09 +02:00
|
|
|
<para>
|
2019-09-19 19:17:30 +02:00
|
|
|
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:
|
2014-08-24 19:18:18 +02:00
|
|
|
<programlisting>
|
2018-04-05 10:43:56 +02:00
|
|
|
<xref linkend="opt-networking.localCommands"/> =
|
2014-08-24 19:18:18 +02:00
|
|
|
''
|
|
|
|
ip -6 addr add 2001:610:685:1::1/64 dev eth0
|
|
|
|
'';
|
|
|
|
</programlisting>
|
2018-05-02 01:57:09 +02:00
|
|
|
</para>
|
2014-08-24 19:18:18 +02:00
|
|
|
</section>
|