metricsPort toString

This commit is contained in:
niten 2023-09-23 16:23:49 -07:00
parent 22cbee82b3
commit 4c2a203aeb

View File

@ -104,10 +104,10 @@ in {
services.nginx = { services.nginx = {
virtualHosts = { virtualHosts = {
"${cfg.smtp.hostname}".locations."/metrics" = { "${cfg.smtp.hostname}".locations."/metrics" = {
proxyPass = "http://localhost:${metricsPort}/metrics"; proxyPass = "http://localhost:${toString metricsPort}/metrics";
}; };
"${cfg.imap.hostname}".locations."/metrics" = { "${cfg.imap.hostname}".locations."/metrics" = {
proxyPass = "http://localhost:${metricsPort}/metrics"; proxyPass = "http://localhost:${toString metricsPort}/metrics";
}; };
}; };
}; };
@ -377,7 +377,7 @@ in {
}; };
metrics-proxy = { metrics-proxy = {
networks = [ "internal_network" ]; networks = [ "internal_network" ];
ports = [ "${cfg.metricsPort}:80" ]; ports = [ "${toString cfg.metricsPort}:80" ];
nixos = { nixos = {
useSystemd = true; useSystemd = true;
configuration = { configuration = {
@ -392,13 +392,13 @@ in {
default = true; default = true;
locations = { locations = {
"/postfix" = { "/postfix" = {
proxyPass = "http://smtp:${metricsPort}/"; proxyPass = "http://smtp:${toString metricsPort}/";
}; };
"/dovecot" = { "/dovecot" = {
proxyPass = "http://imap:${metricsPort}/"; proxyPass = "http://imap:${toString metricsPort}/";
}; };
"rspamd" = { "rspamd" = {
proxyPass = "http://antispam:${metricsPort}/"; proxyPass = "http://antispam:${toString metricsPort}/";
}; };
}; };
}; };