nixos-config/nixos/machines/robi/grafana.nix
2023-02-08 00:19:09 +01:00

22 lines
448 B
Nix

{ config, ... }:
{
services.nginx.virtualHosts.${config.services.grafana.domain} = {
extraConfig = ''
allow ${config.tinc.private.subnet};
deny all;
'';
locations."/" = {
proxyPass = "http://localhost:${toString config.services.grafana.port}";
proxyWebsockets = true;
};
};
services.grafana = {
enable = true;
domain = "grafana.robi.private";
port = 2342;
addr = "localhost";
};
}