nixos-config/configs/workhorse/grafana.nix

39 lines
890 B
Nix
Raw Normal View History

2019-12-20 05:54:26 +01:00
{ config, ... }: {
2019-10-24 02:20:38 +02:00
services.nginx = {
enable = true;
statusPage = true;
virtualHosts = {
"grafana.${config.networking.hostName}.private" = {
2019-12-20 05:54:26 +01:00
serverAliases = [ ];
2019-10-24 02:20:38 +02:00
locations."/" = {
2019-12-20 05:54:26 +01:00
proxyPass = "http://${config.networking.hostName}.private:${
toString config.services.grafana.port
}";
2019-10-24 02:20:38 +02:00
};
};
};
};
services.grafana = {
enable = true;
port = 5656;
2019-12-20 05:54:26 +01:00
addr =
config.module.cluster.services.tinc."private".hosts."${config.networking.hostName}".tincIp;
2019-10-24 02:20:38 +02:00
auth.anonymous = {
enable = true;
org_role = "Editor";
org_name = "AWESOME";
};
provision = {
enable = true;
2019-12-20 05:54:26 +01:00
datasources = [{
type = "prometheus";
isDefault = true;
name = "Prometheus Workhorse";
url = "http://workhorse.private:9090";
}];
2019-10-24 02:20:38 +02:00
};
};
}