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)}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|