nix-dotfiles/hosts/tsuki/services/postgres.nix
h7x4 32885239c3
tsuki/pgadmin: misc
- The pgadmin config has grown, and as a result, it has been split from
    the postgres file.
- Setup OAuth
- Setup uWSGI and forward to nginx via socket
  (This last part is still a little borked, and the service is not
  functioning entirely just yet)
2023-05-08 02:36:13 +02:00

25 lines
708 B
Nix

{ config, pkgs, lib, secrets, ... }: {
services.postgresql = {
enable = true;
enableTCPIP = true;
authentication = pkgs.lib.mkOverride 10 ''
local all all trust
local hydra all ident map=hydra-users
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
'';
port = secrets.ports.postgres;
dataDir = "${config.machineVars.dataDrives.drives.postgres}/${config.services.postgresql.package.psqlSchema}";
# settings = {};
};
services.postgresqlBackup = {
enable = true;
location = "${config.machineVars.dataDrives.drives.backup}/postgres";
backupAll = true;
};
environment.systemPackages = [ config.services.postgresql.package ];
}