git.iko.soy/typeable/nixpkgs
on master help sign in
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=

commit12bab91d3ba343c8dee5093da0eab38136752d60 authorAndrew Kvalheim <Andrew@Kvalhe.im> dateSun 21 Nov 2021, 20:12 (5 years ago) parent726f7c9
2 files changed+2−2
nixos/doc/manual/configuration/renaming-interfaces.section.md+1−1 nixos/doc/manual/from_md/configuration/renaming-interfaces.section.xml+1−1
nixos/doc/manual/configuration/renaming-interfaces.section.md+1−1
@@ -26,7 +26,7 @@ we assign the name `wan` to the interface with MAC address
2626
2727```nix
2828systemd.network.links."10-wan" = {
29− matchConfig.MACAddress = "52:54:00:12:01:01";
29+ matchConfig.PermanentMACAddress = "52:54:00:12:01:01";
3030 linkConfig.Name = "wan";
3131};
3232```
nixos/doc/manual/from_md/configuration/renaming-interfaces.section.xml+1−1
@@ -32,7 +32,7 @@
3232 </para>
3333 <programlisting language="bash">
3434systemd.network.links.&quot;10-wan&quot; = {
35− matchConfig.MACAddress = &quot;52:54:00:12:01:01&quot;;
35+ matchConfig.PermanentMACAddress = &quot;52:54:00:12:01:01&quot;;
3636 linkConfig.Name = &quot;wan&quot;;
3737};
3838</programlisting>