mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00: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 New Issue
Block a user