nixos/networkd: Add the RoutingPolicyRule-related options
This commit is contained in:
committed by
Florian Klink
parent
0a8af284e5
commit
611d765b76
@@ -59,6 +59,11 @@ in rec {
|
||||
optional (attr ? ${name} && ! isMacAddress attr.${name})
|
||||
"Systemd ${group} field `${name}' must be a valid mac address.";
|
||||
|
||||
isPort = i: i >= 0 && i <= 65535;
|
||||
|
||||
assertPort = name: group: attr:
|
||||
optional (attr ? ${name} && ! isPort attr.${name})
|
||||
"Error on the systemd ${group} field `${name}': ${attr.name} is not a valid port number.";
|
||||
|
||||
assertValueOneOf = name: values: group: attr:
|
||||
optional (attr ? ${name} && !elem attr.${name} values)
|
||||
|
||||
Reference in New Issue
Block a user