2023-12-06 18:11:45 +00:00
|
|
|
{ config, flake, ... }:
|
|
|
|
|
|
|
|
{
|
2023-12-06 18:51:27 +00:00
|
|
|
age.secrets.nachtigall-metrics-nginx-basic-auth = {
|
|
|
|
file = "${flake.self}/secrets/nachtigall-metrics-nginx-basic-auth.age";
|
2023-12-06 18:11:45 +00:00
|
|
|
mode = "600";
|
|
|
|
owner = "nginx";
|
|
|
|
};
|
|
|
|
services.nginx.virtualHosts = {
|
|
|
|
"nachtigall.pub.solar" = {
|
|
|
|
enableACME = true;
|
|
|
|
addSSL = true;
|
|
|
|
basicAuthFile = "${config.age.secrets.nachtigall-metrics-nginx-basic-auth.path}";
|
|
|
|
locations."/metrics" = {
|
|
|
|
proxyPass = "http://127.0.0.1:${toString(config.services.prometheus.exporters.node.port)}";
|
|
|
|
};
|
2024-01-25 19:21:50 +00:00
|
|
|
locations."/_synapse/metrics" = {
|
|
|
|
proxyPass = "http://127.0.0.1:${toString (builtins.map (listener: listener.port) config.services.matrix-synapse.settings.listeners)}";
|
|
|
|
};
|
2023-12-06 18:11:45 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|