diff --git a/cluster/services/patroni/default.nix b/cluster/services/patroni/default.nix index 367c2cc..a490000 100644 --- a/cluster/services/patroni/default.nix +++ b/cluster/services/patroni/default.nix @@ -18,7 +18,6 @@ in vars.patroni = { etcdNodes = lib.genAttrs cfg.nodes.etcd (name: config.links."patroni-etcd-node-peer-${name}"); etcdNodesClient = lib.genAttrs cfg.nodes.etcd (name: config.links."patroni-etcd-node-client-${name}"); - etcdExtraNodes = [ "fly=http://10.1.1.151:2380" ]; passwords = { PATRONI_REPLICATION_PASSWORD = ./passwords/replication.age; PATRONI_SUPERUSER_PASSWORD = ./passwords/superuser.age; @@ -35,7 +34,7 @@ in services.patroni = { nodes = { worker = [ "VEGAS" "prophet" ]; - etcd = [ "VEGAS" "prophet" ]; + etcd = [ "checkmate" "VEGAS" "prophet" ]; haproxy = [ "VEGAS" "prophet" ]; }; nixos = { diff --git a/cluster/services/patroni/etcd.nix b/cluster/services/patroni/etcd.nix index e26bc18..94dc9fb 100644 --- a/cluster/services/patroni/etcd.nix +++ b/cluster/services/patroni/etcd.nix @@ -12,7 +12,7 @@ in services.etcd = { enable = true; dataDir = "/srv/storage/private/etcd"; - initialCluster = (map mkMember cluster.config.services.patroni.nodes.etcd) ++ vars.patroni.etcdExtraNodes; + initialCluster = map mkMember cluster.config.services.patroni.nodes.etcd; listenPeerUrls = lib.singleton vars.patroni.etcdNodes.${vars.hostName}.url; listenClientUrls = lib.singleton vars.patroni.etcdNodesClient.${vars.hostName}.url; };