depot/cluster/services/consul/default.nix

21 lines
339 B
Nix
Raw Normal View History

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 = {
nodes.agent = [ "checkmate" "VEGAS" ];
nixos.agent = [
./agent.nix
./remote-api.nix
];
2023-03-05 21:39:15 +02:00
};
}