
- set worker_processes / worker_cpu_affinity to auto, enable pcre_jit - enable ktls - set a default virtualHost for a 404 and use it for reuseport - set enableACME, forceSSL by default, disable for localhost - set robots header and file
21 lines
599 B
Nix
21 lines
599 B
Nix
{ config, inputs, ... }:
|
|
{
|
|
imports = [
|
|
inputs.srvos.nixosModules.roles-prometheus
|
|
./alert-rules.nix
|
|
./matrix-hook.nix
|
|
./prometheus.nix
|
|
./telegraf.nix
|
|
];
|
|
|
|
sops.secrets.nginx-basic-auth-file.owner = "nginx";
|
|
|
|
services.nginx.virtualHosts."monitoring.nix-community.org" = {
|
|
locations."/".return = "302 https://nix-community.org/monitoring";
|
|
locations."/alertmanager/" = {
|
|
basicAuthFile = config.sops.secrets.nginx-basic-auth-file.path;
|
|
proxyPass = "http://localhost:9093/";
|
|
};
|
|
locations."/prometheus/".proxyPass = "http://localhost:9090/";
|
|
};
|
|
}
|