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 000000000000..9131f42842b7 --- /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 00e595c7cb7f..000000000000 --- a/nixos/doc/manual/configuration/ad-hoc-network-config.xml +++ /dev/null @@ -1,20 +0,0 @@ -
- Ad-Hoc Configuration - - - You can use 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: - - = - '' - ip -6 addr add 2001:610:685:1::1/64 dev eth0 - ''; - - -
diff --git a/nixos/doc/manual/configuration/networking.xml b/nixos/doc/manual/configuration/networking.xml index f5587195f1f1..d48536bd48c6 100644 --- a/nixos/doc/manual/configuration/networking.xml +++ b/nixos/doc/manual/configuration/networking.xml @@ -14,7 +14,7 @@ - + diff --git a/nixos/doc/manual/from_md/configuration/ad-hoc-network-config.section.xml b/nixos/doc/manual/from_md/configuration/ad-hoc-network-config.section.xml new file mode 100644 index 000000000000..0424642b978c --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/ad-hoc-network-config.section.xml @@ -0,0 +1,17 @@ +
+ Ad-Hoc Configuration + + You can use + 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: + + +networking.localCommands = + '' + ip -6 addr add 2001:610:685:1::1/64 dev eth0 + ''; + +