mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
fix(z2m): it doesn't like ipv6 anymore..?
This commit is contained in:
parent
f393309849
commit
048af11455
2 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ in {
|
|||
user = "z2m";
|
||||
password = "!secret z2m_pass";
|
||||
server = let
|
||||
url = access.proxyUrlFor { serviceName = "mosquitto"; scheme = "mqtt"; };
|
||||
url = access.proxyUrlFor { serviceName = "mosquitto"; scheme = "mqtt"; getAddressFor = "getAddress4For"; };
|
||||
in mkIf (!config.services.mosquitto.enable) (
|
||||
mkAlmostDefault url
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue