h7x4
f2a89d7c82
- 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
23 lines
447 B
Nix
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}";
|
|
};
|
|
};
|
|
}
|