dotfiles/modules/nixos/services/grafana.nix
2023-07-07 10:16:07 -06:00

23 lines
461 B
Nix

{ config, lib, ... }: {
config = lib.mkIf config.services.grafana.enable {
services.grafana.settings.server = {
domain = config.hostnames.metrics;
http_addr = "127.0.0.1";
http_port = 3000;
protocol = "http";
};
caddy.routes = [{
match = [{ host = [ config.hostnames.metrics ]; }];
handle = [{
handler = "reverse_proxy";
upstreams = [{ dial = "localhost:3000"; }];
}];
}];
};
}