mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
nixos/networkd: fix netdev MAC addresses asserts
The `||` condition made it fail no matter what because nothing can be none and a proper MAC address. Thanks to trofi for catching it.
This commit is contained in:
parent
dee942ff99
commit
1ca68deebd
|
@ -66,7 +66,7 @@ in rec {
|
|||
"Systemd ${group} field `${name}' must be a valid MAC address.";
|
||||
|
||||
assertNetdevMacAddress = name: group: attr:
|
||||
optional (attr ? ${name} && (! isMacAddress attr.${name} || attr.${name} != "none"))
|
||||
optional (attr ? ${name} && (! isMacAddress attr.${name} && attr.${name} != "none"))
|
||||
"Systemd ${group} field `${name}` must be a valid MAC address or the special value `none`.";
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue