lol

Merge pull request #241365 from RaitoBezarius/macaddrs-netdevs

nixos/networkd: support netdev MAC addresses

authored by

Florian Klink and committed by
GitHub
6f66c57a 05f22063

+7 -2
+6 -1
nixos/lib/systemd-lib.nix
··· 63 63 64 64 assertMacAddress = name: group: attr: 65 65 optional (attr ? ${name} && ! isMacAddress attr.${name}) 66 - "Systemd ${group} field `${name}' must be a valid mac address."; 66 + "Systemd ${group} field `${name}' must be a valid MAC address."; 67 + 68 + assertNetdevMacAddress = name: group: attr: 69 + optional (attr ? ${name} && (! isMacAddress attr.${name} || attr.${name} != "none")) 70 + "Systemd ${group} field `${name}` must be a valid MAC address or the special value `none`."; 71 + 67 72 68 73 isPort = i: i >= 0 && i <= 65535; 69 74
+1 -1
nixos/modules/system/boot/networkd.nix
··· 171 171 "batadv" 172 172 ]) 173 173 (assertByteFormat "MTUBytes") 174 - (assertMacAddress "MACAddress") 174 + (assertNetdevMacAddress "MACAddress") 175 175 ]; 176 176 177 177 sectionVLAN = checkUnitConfig "VLAN" [