nixos/doc: improve example of renaming network interfaces

For reliably identifying network interfaces, `PermanentMACAddress` is
likely to be preferable to `MACAddress`. NetworkManager in particular
commonly changes the MAC address of wireless interfaces.

Reference:

  - https://www.freedesktop.org/software/systemd/man/systemd.link.html#PermanentMACAddress=
This commit is contained in:
Andrew Kvalheim 2021-11-21 20:12:31 -08:00
parent 726f7c9688
commit 12bab91d3b
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ we assign the name `wan` to the interface with MAC address
```nix
systemd.network.links."10-wan" = {
matchConfig.MACAddress = "52:54:00:12:01:01";
matchConfig.PermanentMACAddress = "52:54:00:12:01:01";
linkConfig.Name = "wan";
};
```

View File

@ -32,7 +32,7 @@
</para>
<programlisting language="bash">
systemd.network.links.&quot;10-wan&quot; = {
matchConfig.MACAddress = &quot;52:54:00:12:01:01&quot;;
matchConfig.PermanentMACAddress = &quot;52:54:00:12:01:01&quot;;
linkConfig.Name = &quot;wan&quot;;
};
</programlisting>