1
0
Fork 0
nixos-config/nixos/roles/monitoring/default.nix
2023-02-02 04:58:37 +01:00

44 lines
908 B
Nix

{
config,
pkgs,
...
}: let
commonOptions = {
enableACME = true;
forceSSL = true;
extraConfig = ''
satisfy any;
allow ${config.m-0.prefix}::/64;
deny all;
'';
basicAuthFile = config.age.secrets."basic-auth/monitoring".path;
};
in {
imports = [
./alertmanager.nix
./grafana.nix
./prometheus.nix
./probes.nix
];
services = {
nginx = {
enable = true;
virtualHosts."alerts.maralorn.de" =
{
locations."/".proxyPass = "http://localhost:9093";
}
// commonOptions;
virtualHosts."stats.maralorn.de" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://localhost:3000/";
};
virtualHosts."monitoring.maralorn.de" =
{
locations."/".proxyPass = "http://localhost:9090";
}
// commonOptions;
};
};
}