Tom Hubrecht
9059ebe4d8
All checks were successful
build configuration / build_compute01 (push) Successful in 54s
build configuration / build_storage01 (push) Successful in 1m37s
build configuration / build_vault01 (push) Successful in 47s
build configuration / build_web02 (push) Successful in 46s
build configuration / build_web01 (push) Successful in 1m8s
lint / check (push) Successful in 20s
ds-fr update / npins_update (push) Successful in 2m8s
43 lines
800 B
Nix
43 lines
800 B
Nix
{ config, ... }:
|
|
|
|
let
|
|
host = "prometheus.dgnum.eu";
|
|
port = 9091;
|
|
in
|
|
|
|
{
|
|
services.prometheus = {
|
|
enable = true;
|
|
|
|
inherit port;
|
|
|
|
checkConfig = "syntax-only";
|
|
enableReload = true;
|
|
|
|
listenAddress = "127.0.0.1";
|
|
|
|
webConfigFile = config.age.secrets."prometheus-web_config_file".path;
|
|
|
|
webExternalUrl = "https://${host}";
|
|
|
|
scrapeConfigs = [
|
|
{
|
|
job_name = "prometheus";
|
|
static_configs = [ { targets = [ "localhost:9090" ]; } ];
|
|
}
|
|
];
|
|
};
|
|
|
|
services.nginx.virtualHosts.${host} = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
|
|
locations."/" = {
|
|
proxyPass = "http://127.0.0.1:${builtins.toString port}";
|
|
proxyWebsockets = true;
|
|
recommendedProxySettings = true;
|
|
};
|
|
};
|
|
|
|
age-secrets.autoMatch = [ "prometheus" ];
|
|
}
|