From 4c2a203aeb9a8ca1898e36067faa7c633dc31036 Mon Sep 17 00:00:00 2001 From: niten Date: Sat, 23 Sep 2023 16:23:49 -0700 Subject: [PATCH] metricsPort toString --- mail-server.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mail-server.nix b/mail-server.nix index 614e5c1..bed462f 100644 --- a/mail-server.nix +++ b/mail-server.nix @@ -104,10 +104,10 @@ in { services.nginx = { virtualHosts = { "${cfg.smtp.hostname}".locations."/metrics" = { - proxyPass = "http://localhost:${metricsPort}/metrics"; + proxyPass = "http://localhost:${toString metricsPort}/metrics"; }; "${cfg.imap.hostname}".locations."/metrics" = { - proxyPass = "http://localhost:${metricsPort}/metrics"; + proxyPass = "http://localhost:${toString metricsPort}/metrics"; }; }; }; @@ -377,7 +377,7 @@ in { }; metrics-proxy = { networks = [ "internal_network" ]; - ports = [ "${cfg.metricsPort}:80" ]; + ports = [ "${toString cfg.metricsPort}:80" ]; nixos = { useSystemd = true; configuration = { @@ -392,13 +392,13 @@ in { default = true; locations = { "/postfix" = { - proxyPass = "http://smtp:${metricsPort}/"; + proxyPass = "http://smtp:${toString metricsPort}/"; }; "/dovecot" = { - proxyPass = "http://imap:${metricsPort}/"; + proxyPass = "http://imap:${toString metricsPort}/"; }; "rspamd" = { - proxyPass = "http://antispam:${metricsPort}/"; + proxyPass = "http://antispam:${toString metricsPort}/"; }; }; };