fix(z2m): it doesn't like ipv6 anymore..?

This commit is contained in:
arcnmx 2024-05-08 17:22:00 -07:00
parent f393309849
commit 048af11455
2 changed files with 3 additions and 2 deletions

View file

@ -108,13 +108,14 @@
portName ? "default",
network ? "lan",
scheme ? null,
getAddressFor ? "getAddressFor"
}: let
port = service.ports.${portName};
scheme' = if scheme == null then port.protocol else scheme;
port' = if !port.enable
then throw "${system.name}.exports.services.${service.name}.ports.${portName} isn't enabled"
else ":${toString port.port}";
host = access.getAddressFor system.name network;
host = access.${getAddressFor} system.name network;
url = "${scheme'}://${mkAddress6 host}${port'}";
in assert service.enable; url;
};