2024-08-14 03:59:33 +03:00
|
|
|
{ config, lib, ... }:
|
|
|
|
{
|
|
|
|
patroni = lib.mkIf config.simulacrum {
|
|
|
|
databases = config.lib.forService "patroni" {
|
|
|
|
testdb.owner = "testuser";
|
2024-08-15 02:07:07 +03:00
|
|
|
existingdb.owner = "existinguser";
|
2024-08-14 03:59:33 +03:00
|
|
|
};
|
|
|
|
users = config.lib.forService "patroni" {
|
|
|
|
testuser.locksmith = {
|
|
|
|
nodes = config.services.patroni.nodes.haproxy;
|
|
|
|
format = "pgpass";
|
|
|
|
};
|
2024-08-15 02:07:07 +03:00
|
|
|
existinguser.locksmith = {
|
|
|
|
nodes = config.services.patroni.nodes.haproxy;
|
|
|
|
format = "pgpass";
|
|
|
|
};
|
2024-08-14 03:59:33 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|