forked from mirrors_public/oddlama_nix-config
fix: propagate influxdb token secrets properly and simplify distributed configuration implementation (repo.nodes)
This commit is contained in:
parent
0ed8f2041d
commit
c494c66f5a
5 changed files with 58 additions and 42 deletions
|
@ -29,16 +29,25 @@ in {
|
|||
group = "grafana";
|
||||
};
|
||||
|
||||
nodes.ward-influxdb.services.influxdb2.provision.ensureApiTokens = [
|
||||
{
|
||||
name = "grafana servers:telegraf (${config.node.name})";
|
||||
org = "servers";
|
||||
user = "admin";
|
||||
readBuckets = ["telegraf"];
|
||||
writeBuckets = ["telegraf"];
|
||||
tokenFile = config.age.secrets.grafana-influxdb-token.path;
|
||||
}
|
||||
];
|
||||
nodes.ward-influxdb = {
|
||||
# Mirror the original secret on the influx host
|
||||
age.secrets."grafana-influxdb-token-${config.node.name}" = {
|
||||
inherit (config.age.secrets.grafana-influxdb-token) rekeyFile;
|
||||
mode = "440";
|
||||
group = "influxdb2";
|
||||
};
|
||||
|
||||
services.influxdb2.provision.ensureApiTokens = [
|
||||
{
|
||||
name = "grafana servers:telegraf (${config.node.name})";
|
||||
org = "servers";
|
||||
user = "admin";
|
||||
readBuckets = ["telegraf"];
|
||||
writeBuckets = ["telegraf"];
|
||||
tokenFile = nodes.ward-influxdb.config.age.secrets."grafana-influxdb-token-${config.node.name}".path;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
nodes.sentinel = {
|
||||
age.secrets.loki-basic-auth-hashes.generator.dependencies = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue