nix-dotfiles/hosts/tsuki/services/grafana/default.nix
h7x4 f2a89d7c82
grafana: split up configuration + postgres
- Move `services/grafana.nix` to `services/grafana/default.nix`
- Split up all data collectors into separate files under
  `services/grafana`
- Make grafana use postgres as its database
2022-11-26 17:16:04 +01:00

23 lines
447 B
Nix

{ config, lib, secrets, ... }:
{
imports = [
./prometheus.nix
./influxdb.nix
./loki.nix
];
services.grafana = {
enable = true;
domain = "log.nani.wtf";
port = secrets.ports.grafana;
addr = "0.0.0.0";
dataDir = "${config.machineVars.dataDrives.default}/var/grafana";
database = {
type = "postgres";
user = "grafana";
host = "localhost:${toString secrets.ports.postgres}";
};
};
}