Added server options for nomad and consul

This commit is contained in:
marc
2024-02-11 20:58:26 +01:00
parent 042e246b1b
commit e716f7cb7d
14 changed files with 204 additions and 39 deletions

View File

@@ -1,8 +1,14 @@
{ config, pkgs, lib, ... }:
let
consulCfg = config.samfelag.modules.server.consul;
nomadCfg = config.samfelag.modules.server.nomad;
in
{
config = {
age.secrets = {
# Consul -------------------------------
} //
# Consul -------------------------------
lib.optionalAttrs consulCfg.enable {
"consul.d/gossip.json" = {
file = ../secrets/consul.d/gossip.json.age;
owner = "consul";
@@ -21,6 +27,13 @@
group = "consul";
mode = "644";
};
} //
# Nomad -------------------------------
lib.optionalAttrs nomadCfg.enable {
"nomad.d/consul-token.json" = {
file = ../secrets/nomad.d/consul-token.json.age;
mode = "644";
};
};
};
}