pkgs/ap: add ${hostName} to exceptions

This commit is contained in:
Astro 2022-02-10 18:52:43 +01:00
parent 9275bb8cc3
commit 674cd3bfa2
1 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ let
then portByIndex.${index}.port
else if portByIndex.${index} ? interface
then portByIndex.${index}.interface
else throw "What is port ${lib.generators.toPretty {} portByIndex.${index}.port}?"
else throw "${hostName}: What is port ${lib.generators.toPretty {} portByIndex.${index}.port}?"
}"
) (
builtins.sort builtins.lessThan (
@ -66,7 +66,7 @@ let
)
);
in if hostPorts == []
then throw "No host ports found for OpenWRT model ${hostConfig.model}"
then throw "${hostName}: No host ports found for OpenWRT model ${hostConfig.model}"
else builtins.head hostPorts;
switchPortIndices = f:
@ -118,7 +118,7 @@ let
then switchHostInterface
else if portData ? interface
then portData.interface
else throw "Cannot find interface for ${port} on OpenWRT model ${hostConfig.model}"
else throw "${hostName}: Cannot find interface for ${port} on OpenWRT model ${hostConfig.model}"
) + (
if trunk || switch != null
then ".${toString vlan}"
@ -196,7 +196,7 @@ in ''
uci set network.mgmt.ifname='${
if builtins.length (networkInterfaces "mgmt") > 0
then lib.concatStringsSep " " (networkInterfaces "mgmt")
else throw "No interface for mgmt"
else throw "${hostName}: No interface for mgmt"
}'
uci set network.mgmt.proto=static
${lib.optionalString (hostConfig.interfaces.mgmt.type == "bridge") ''