chore(monitoring): nf-fmt-nix

This commit is contained in:
arcnmx 2024-06-01 11:24:51 -07:00
parent 23b746191f
commit f1d249d4c0
10 changed files with 208 additions and 135 deletions

View file

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