From 1ca68deebd5a6d14fde1428cfce16ccb36c11efc Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Thu, 20 Jul 2023 11:03:46 +0200 Subject: [PATCH] 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. --- nixos/lib/systemd-lib.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/systemd-lib.nix b/nixos/lib/systemd-lib.nix index 61ac04eff288..585c4e514628 100644 --- a/nixos/lib/systemd-lib.nix +++ b/nixos/lib/systemd-lib.nix @@ -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`.";