self-hosting/modules/postgresql.nix

19 lines
520 B
Nix
Raw Normal View History

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 = ''
root_as_others root synapse
'';
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
}