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

25 lines
532 B
Nix
Raw Normal View History

2023-02-08 00:19:09 +01:00
{ config, ... }:
{
2023-02-10 16:22:00 +01:00
services.nginx.virtualHosts.${config.services.grafana.settings.server.domain} = {
2023-02-08 00:19:09 +01:00
extraConfig = ''
allow ${config.tinc.private.subnet};
deny all;
'';
locations."/" = {
2023-02-10 16:22:00 +01:00
proxyPass = "http://localhost:${toString config.services.grafana.settings.server.http_port}";
2023-02-08 00:19:09 +01:00
proxyWebsockets = true;
};
};
services.grafana = {
enable = true;
2023-02-10 16:22:00 +01:00
settings.server = {
domain = "grafana.robi.private";
http_port = 2342;
http_addr = "localhost";
};
2023-02-08 00:19:09 +01:00
};
}