depot/packages/checks/modules/consul.nix

20 lines
434 B
Nix
Raw Permalink Normal View History

2023-09-03 04:15:45 +03:00
{ config, ... }:
{
extraBaseModules = {
services.consul.extraConfig.addresses.http = config.nodes.consul.networking.primaryIPAddress;
};
nodes.consul = { config, ... }: {
networking.firewall.allowedTCPPorts = [ 8500 ];
services.consul = {
enable = true;
extraConfig = {
bind_addr = config.networking.primaryIPAddress;
server = true;
bootstrap_expect = 1;
};
};
};
}