Commit 1ca68dee authored by Raito Bezarius's avatar Raito Bezarius
Browse files

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.
parent dee942ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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`.";