Allow for smtp == imap servers
This commit is contained in:
parent
7a9e234259
commit
cefa63892d
|
@ -201,14 +201,13 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services = {
|
services = {
|
||||||
nginx = {
|
nginx = {
|
||||||
virtualHosts = {
|
virtualHosts =
|
||||||
"${cfg.smtp.hostname}".locations."/metrics" = {
|
let mailHostnames = unique [ cfg.smtp.hostname cfg.imap.hostname ];
|
||||||
proxyPass = "http://localhost:${toString metricsPort}/metrics";
|
in genAttrs mailHostnames (hostname: {
|
||||||
};
|
"${hostname}".locations."/metrics" = {
|
||||||
"${cfg.imap.hostname}".locations."/metrics" = {
|
proxyPass = "http://localhost:${toString metricsPort}/metrics";
|
||||||
proxyPass = "http://localhost:${toString metricsPort}/metrics";
|
};
|
||||||
};
|
});
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue