nixos-config/nixos/machines/robi/grafana.nix

23 lines
448 B
Nix
Raw Normal View History

2023-02-08 00:19:09 +01:00
{ 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";
};
}