reformat and restructure

This commit is contained in:
XenGi 2026-03-01 15:11:15 +01:00
parent cbb12c73e7
commit dc6b3805f6
Signed by: xengi
SSH key fingerprint: SHA256:dM+fLZGsDvyv6kunjE8bGduL24VsCFB4LEOSdmRHdG0
20 changed files with 173 additions and 158 deletions

View file

@ -4,6 +4,11 @@
# - Synapse: https://github.com/element-hq/synapse/tree/master/contrib/grafana
{
imports = [
../../services/nginx.nix
../../services/prometheus-nginx.nix
];
services = {
grafana = {
enable = true;
@ -43,6 +48,35 @@
];
};
};
nginx = {
upstreams."grafana".servers."[${config.services.grafana.settings.server.http_addr}]:${toString config.services.grafana.settings.server.http_port}" =
{ };
virtualHosts."monitoring.${config.networking.domain}" = {
default = true;
quic = true;
kTLS = true;
forceSSL = true;
enableACME = true;
#extraConfig = ''
# map $http_upgrade $connection_upgrade {
# default upgrade;
# \'\' close;
# }
#'';
locations = {
"/" = {
basicAuthFile = config.age.secrets.grafana_basic_auth.path;
proxyPass = "http://grafana";
recommendedProxySettings = true;
};
"/api/live/" = {
proxyPass = "http://grafana";
recommendedProxySettings = true;
proxyWebsockets = true;
};
};
};
};
};
}