depot/cluster/services/patroni/default.nix

27 lines
602 B
Nix
Raw Normal View History

2022-08-05 00:57:54 +03:00
{ config, lib, ... }:
{
vars.patroni = {
passwords = {
PATRONI_REPLICATION_PASSWORD = ./passwords/replication.age;
PATRONI_SUPERUSER_PASSWORD = ./passwords/superuser.age;
PATRONI_REWIND_PASSWORD = ./passwords/rewind.age;
};
};
links = {
2022-08-05 00:57:54 +03:00
patroni-pg-internal.ipv4 = "0.0.0.0";
patroni-api.ipv4 = "0.0.0.0";
patroni-pg-access.ipv4 = "127.0.0.1";
};
services.patroni = {
nodes = {
worker = [ "VEGAS" "prophet" ];
haproxy = [ "VEGAS" "prophet" ];
};
nixos = {
worker = ./worker.nix;
haproxy = ./haproxy.nix;
};
};
}