nixos-config/nixos/machines/chungus/grafana.nix
2023-04-29 23:29:05 +02:00

24 lines
532 B
Nix

{ 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;
};
};
services.grafana = {
enable = true;
settings.server = {
domain = "grafana.pepe.private";
http_port = 2342;
http_addr = "localhost";
};
};
}