cluster/services/frangiclave: some cluster stuff
This commit is contained in:
parent
fa5830ec1f
commit
757e7ef54c
2 changed files with 25 additions and 2 deletions
|
@ -1,13 +1,21 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.frangiclave = {
|
||||
nodes = {
|
||||
server = [ "VEGAS" "grail" "prophet" ]; # 3 reliable nodes
|
||||
server = [ "VEGAS" "grail" "prophet" ];
|
||||
cluster = config.services.frangiclave.nodes.server;
|
||||
agent = []; # all nodes, for vault-agent, secret templates, etc.
|
||||
};
|
||||
meshLinks = {
|
||||
server.link.protocol = "http";
|
||||
cluster.link.protocol = "http";
|
||||
};
|
||||
nixos = {
|
||||
server = [
|
||||
./server.nix
|
||||
];
|
||||
cluster = [];
|
||||
agent = [];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,8 +1,23 @@
|
|||
{ depot, ... }:
|
||||
{ cluster, config, depot, ... }:
|
||||
|
||||
let
|
||||
apiLink = cluster.config.hostLinks.${config.networking.hostName}.frangiclave-server;
|
||||
clusterLink = cluster.config.hostLinks.${config.networking.hostName}.frangiclave-cluster;
|
||||
in
|
||||
|
||||
{
|
||||
services.vault = {
|
||||
enable = true;
|
||||
package = depot.packages.openbao;
|
||||
address = apiLink.tuple;
|
||||
extraConfig = /*hcl*/ ''
|
||||
api_addr = "${apiLink.url}"
|
||||
cluster_addr = "${clusterLink.url}"
|
||||
'';
|
||||
|
||||
storageBackend = "raft";
|
||||
storageConfig = /*hcl*/ ''
|
||||
node_id = "x${builtins.hashString "sha256" "frangiclave-node-${config.networking.hostName}"}"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue