dots/hosts/luna/modules/monitoring/grafana.nix

27 lines
633 B
Nix
Raw Normal View History

2024-08-25 00:28:11 -05:00
{ config, ... }:
2024-05-03 14:35:00 -05:00
let
2024-08-25 00:28:11 -05:00
grafana_host = "grafana.orion-technologies.io";
2024-05-03 14:35:00 -05:00
in
{
services = {
grafana = {
enable = true;
settings.server = {
domain = "${grafana_host}";
http_addr = "127.0.0.1";
http_port = 2342;
};
};
nginx.virtualHosts."${grafana_host}" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://${config.services.grafana.settings.server.http_addr}:${builtins.toString config.services.grafana.settings.server.http_port}";
proxyWebsockets = true;
recommendedProxySettings = true;
};
};
};
}