1
0
Fork 0
forked from pub-solar/infra
pub-solar-infra-new/hosts/nachtigall/apps/nginx-prometheus-exporters.nix
2023-12-13 02:12:11 +01:00

20 lines
542 B
Nix

{ config, flake, ... }:
{
age.secrets.nachtigall-metrics-basic-auth = {
file = "${flake.self}/secrets/nachtigall-metrics-basic-auth.age";
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)}";
};
};
};
}