mirror of
https://git.feal.no/felixalb/nixos-config.git
synced 2024-12-13 16:31:48 +01:00
31 lines
714 B
Nix
31 lines
714 B
Nix
{ config, pkgs, lib, ... }:
|
|
{
|
|
services.postgresql = {
|
|
enable = true;
|
|
/* enableTCPIP = true; # Expose on the network */
|
|
authentication = pkgs.lib.mkOverride 10 ''
|
|
local gitea all ident map=gitea-users
|
|
local vaultwarden all ident map=vaultwarden-users
|
|
local all all trust
|
|
host all all 127.0.0.1/32 trust
|
|
host all all ::1/128 trust
|
|
'';
|
|
identMap = ''
|
|
gitea-users gitea gitea
|
|
vaultwarden-users vaultwarden vaultwarden
|
|
'';
|
|
};
|
|
|
|
services.postgresqlBackup = {
|
|
enable = true;
|
|
location = "/var/backup/postgres";
|
|
startAt = "*-*-* 03:15:00";
|
|
backupAll = true;
|
|
};
|
|
|
|
|
|
environment.systemPackages = [ config.services.postgresql.package ];
|
|
}
|
|
|
|
|