reformat and restructure
This commit is contained in:
parent
cbb12c73e7
commit
dc6b3805f6
20 changed files with 173 additions and 158 deletions
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue