homelab/machines/monitor/influxdb.nix
plasmagoat 032072374b
Some checks failed
Test / tests (push) Has been cancelled
moved mail
2025-07-17 00:35:44 +02:00

32 lines
768 B
Nix

{config, ...}: let
influxdbPassword = config.sops.secrets."influxdb/password".path;
influxdbToken = config.sops.secrets."influxdb/token".path;
in {
sops.secrets."influxdb/password" = {
sopsFile = ../../secrets/secrets.yaml;
owner = "influxdb2";
};
sops.secrets."influxdb/token" = {
sopsFile = ../../secrets/secrets.yaml;
group = "influxdb2";
mode = "0440";
};
networking.firewall.allowedTCPPorts = [8086];
services.influxdb2 = {
enable = true;
settings = {
};
provision = {
enable = true;
initialSetup = {
username = "plasmagoat";
passwordFile = influxdbPassword;
tokenFile = influxdbToken;
organization = "procopius";
bucket = "proxmox";
};
};
};
}