22 lines
448 B
Nix
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.pepe.private";
|
|
port = 2342;
|
|
addr = "localhost";
|
|
};
|
|
|
|
}
|