nixos-config/machines/chungus/telemetry/grafana.nix

38 lines
864 B
Nix
Raw Normal View History

2023-04-29 23:29:05 +02:00
{ config, ... }:
{
services.nginx.virtualHosts.${config.services.grafana.settings.server.domain} = {
extraConfig = ''
allow ${config.tinc.private.subnet};
deny all;
'';
locations."/" = {
proxyPass = "http://localhost:${toString config.services.grafana.settings.server.http_port}";
proxyWebsockets = true;
};
};
healthchecks.http.grafana = {
url = "grafana.${config.networking.hostName}.private";
};
2023-04-29 23:29:05 +02:00
services.grafana = {
enable = true;
2023-05-12 23:47:19 +02:00
settings = {
server = {
domain = "grafana.${config.networking.hostName}.private";
http_port = 2342;
2024-07-14 12:22:49 +02:00
http_addr = "127.0.0.1";
2023-05-12 23:47:19 +02:00
};
users.default_theme = "light";
"auth.anonymous" = {
enabled = true;
org_name = "Chungus";
org_role = "Viewer";
hide_version = true;
};
2023-04-29 23:29:05 +02:00
};
};
}