2021-07-01 17:15:04 +02:00
|
|
|
# Ad-Hoc Configuration {#ad-hoc-network-config}
|
|
|
|
|
2021-07-04 03:56:26 +02:00
|
|
|
You can use [](#opt-networking.localCommands) to
|
2021-07-01 17:15:04 +02:00
|
|
|
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
|
2024-03-27 19:10:27 +01:00
|
|
|
{
|
|
|
|
networking.localCommands =
|
|
|
|
''
|
|
|
|
ip -6 addr add 2001:610:685:1::1/64 dev eth0
|
|
|
|
'';
|
|
|
|
}
|
2021-07-01 17:15:04 +02:00
|
|
|
```
|