nixos-config/hosts/chunk/grafana.nix

40 lines
821 B
Nix
Raw Normal View History

2024-12-19 02:32:58 -05:00
{ config, ... }:
{
2024-12-15 18:42:50 -05:00
services.grafana = {
enable = true;
settings.server = {
http_addr = "127.0.0.1";
http_port = 8088;
enforce_domain = true;
enable_gzip = true;
domain = "grafana.cything.io";
};
settings.analytics.reporting_enabled = false;
};
services.prometheus = {
enable = true;
exporters = {
node = {
enable = true;
2024-12-19 02:32:58 -05:00
enabledCollectors = [ "systemd" ];
2024-12-15 18:42:50 -05:00
};
};
scrapeConfigs = [
{
job_name = "chrysalis";
2024-12-16 11:40:19 -05:00
static_configs = [
{
2024-12-19 02:32:58 -05:00
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
2024-12-16 11:40:19 -05:00
}
];
2024-12-15 18:42:50 -05:00
}
];
};
services.caddy.virtualHosts."grafana.cy7.sh".extraConfig = ''
import common
reverse_proxy localhost:8088
'';
2024-12-15 18:42:50 -05:00
}