add anarkafem.dev, minor tweaks

This commit is contained in:
Emelie 2021-09-23 16:45:06 +02:00
parent 3ed18d33fc
commit 0969b36564
Signed by: emelie
GPG key ID: 49D33365A7E22D12
18 changed files with 374 additions and 15 deletions

View file

@ -0,0 +1,28 @@
{ pkgs, ... }:
{
services.postgresql = {
enable = true;
package = pkgs.postgresql_13;
initialScript = pkgs.writeText "synapse-init.sql" ''
CREATE ROLE synapse;
CREATE DATABASE synapse WITH OWNER synapse
TEMPLATE template0
LC_COLLATE = "C"
LC_CTYPE = "C"
ENCODING = "UTF8";
'';
authentication = pkgs.lib.mkOverride 10 ''
local all all trust
host all all ::1/128 trust
'';
};
services.postgresqlBackup = {
enable = true;
location = "/var/lib/postgresql/backup";
databases = [ "synapse" ];
startAt = "02:30";
compression = "none";
};
}