2023-03-05 21:39:15 +02:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.services.consul;
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
hostLinks = lib.genAttrs cfg.nodes.agent (hostName: {
|
|
|
|
consul = {
|
|
|
|
ipv4 = config.vars.mesh.${hostName}.meshIp;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
services.consul = {
|
2024-07-18 00:22:02 +03:00
|
|
|
nodes = {
|
|
|
|
agent = [ "checkmate" "grail" "thunderskin" "VEGAS" "prophet" ];
|
|
|
|
ready = config.services.consul.nodes.agent;
|
2024-08-23 00:27:15 +03:00
|
|
|
bootstrap = [ "grail" "VEGAS" ];
|
2024-07-18 00:22:02 +03:00
|
|
|
};
|
|
|
|
nixos = {
|
|
|
|
agent = [
|
|
|
|
./agent.nix
|
|
|
|
./remote-api.nix
|
|
|
|
];
|
|
|
|
ready = ./ready.nix;
|
2024-08-23 00:27:15 +03:00
|
|
|
bootstrap = ./bootstrap.nix;
|
2024-07-18 00:22:02 +03:00
|
|
|
};
|
2024-07-23 03:47:01 +03:00
|
|
|
simulacrum = {
|
|
|
|
enable = true;
|
2024-08-23 00:27:15 +03:00
|
|
|
deps = [ "wireguard" "locksmith" ];
|
2024-07-23 03:47:01 +03:00
|
|
|
settings = ./test.nix;
|
|
|
|
};
|
2023-03-05 21:39:15 +02:00
|
|
|
};
|
2023-11-03 02:58:32 +02:00
|
|
|
|
|
|
|
dns.records."consul-remote.internal".consulService = "consul-remote";
|
2023-03-05 21:39:15 +02:00
|
|
|
}
|