2023-10-05 22:14:29 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
{
|
|
|
|
services.postgresql = {
|
|
|
|
enable = true;
|
|
|
|
enableTCPIP = true; # Expose on the network
|
2023-10-06 00:19:04 +02:00
|
|
|
authentication = pkgs.lib.mkOverride 10 ''
|
|
|
|
local all all trust
|
|
|
|
host all all 127.0.0.1/32 trust
|
|
|
|
host all all ::1/128 trust
|
|
|
|
'';
|
2023-10-05 22:14:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
services.postgresqlBackup = {
|
|
|
|
enable = true;
|
|
|
|
location = "/backup/postgresql/";
|
|
|
|
startAt = "*-*-* 03:15:00";
|
|
|
|
backupAll = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
environment.systemPackages = [ config.services.postgresql.package ];
|
|
|
|
}
|