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;
|
|
|
|
};
|
|
|
|
};
|
2023-03-05 21:51:20 +02:00
|
|
|
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 = {
|
2023-12-01 01:20:28 +02:00
|
|
|
worker = [ "grail" "thunderskin" "VEGAS" ];
|
2023-03-06 17:21:40 +02:00
|
|
|
haproxy = [ "checkmate" "VEGAS" "prophet" ];
|
2022-08-05 00:57:54 +03:00
|
|
|
};
|
|
|
|
nixos = {
|
2023-06-02 00:18:22 +03:00
|
|
|
worker = [
|
|
|
|
./worker.nix
|
|
|
|
./metrics.nix
|
|
|
|
];
|
2022-08-05 00:57:54 +03:00
|
|
|
haproxy = ./haproxy.nix;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|