update grafana

This commit is contained in:
Ingolf Wagner 2023-02-10 16:22:00 +01:00
parent ce96ef77a3
commit c565a9873a
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
2 changed files with 12 additions and 8 deletions

View file

@ -14,9 +14,11 @@
services.grafana = { services.grafana = {
enable = true; enable = true;
settings.server = {
domain = "grafana.pepe.private"; domain = "grafana.pepe.private";
port = 2342; http_port = 2342;
addr = "localhost"; http_addr = "localhost";
};
}; };
} }

View file

@ -1,22 +1,24 @@
{ config, ... }: { config, ... }:
{ {
services.nginx.virtualHosts.${config.services.grafana.domain} = { services.nginx.virtualHosts.${config.services.grafana.settings.server.domain} = {
extraConfig = '' extraConfig = ''
allow ${config.tinc.private.subnet}; allow ${config.tinc.private.subnet};
deny all; deny all;
''; '';
locations."/" = { locations."/" = {
proxyPass = "http://localhost:${toString config.services.grafana.port}"; proxyPass = "http://localhost:${toString config.services.grafana.settings.server.http_port}";
proxyWebsockets = true; proxyWebsockets = true;
}; };
}; };
services.grafana = { services.grafana = {
enable = true; enable = true;
settings.server = {
domain = "grafana.robi.private"; domain = "grafana.robi.private";
port = 2342; http_port = 2342;
addr = "localhost"; http_addr = "localhost";
};
}; };
} }