From 674cd3bfa2837562f4476e60e7501ad499982fda Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 10 Feb 2022 18:52:43 +0100 Subject: [PATCH] pkgs/ap: add ${hostName} to exceptions --- nix/pkgs/ap.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nix/pkgs/ap.nix b/nix/pkgs/ap.nix index e3c789d..d2dc42a 100644 --- a/nix/pkgs/ap.nix +++ b/nix/pkgs/ap.nix @@ -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") ''