dots/hosts/luna/modules/monitoring/grafana.nix
Price Hiller c27bdf76cd
Some checks failed
Check Formatting of Files / Check-Formatting (push) Failing after 43s
refactor(nix): cleanup toplevel flake
2024-08-25 00:28:28 -05:00

27 lines
633 B
Nix

{ config, ... }:
let
grafana_host = "grafana.orion-technologies.io";
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;
};
};
};
}