2021-07-15 17:09:32 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
{
|
|
|
|
|
services.postgresql = {
|
|
|
|
|
enable = true;
|
|
|
|
|
package = pkgs.postgresql_12;
|
|
|
|
|
initialScript = "/var/keys/postgres-init.sql";
|
|
|
|
|
enableTCPIP = true;
|
2021-07-15 23:46:01 +02:00
|
|
|
identMap = ''
|
2021-07-16 03:09:29 +02:00
|
|
|
root_as_others root synapse
|
2021-07-15 23:46:01 +02:00
|
|
|
'';
|
2021-07-15 17:09:32 +02:00
|
|
|
authentication = ''
|
2021-07-15 23:46:01 +02:00
|
|
|
local all postgres peer
|
|
|
|
|
local all all peer map=root_as_others
|
|
|
|
|
host all all 10.0.1.0/24 md5
|
2021-07-15 17:09:32 +02:00
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
users.users.postgres.extraGroups = [ "keys" ];
|
2021-07-15 17:33:31 +02:00
|
|
|
}
|