2022-06-21 01:47:36 +02:00
|
|
|
{ config, pkgs, lib, secrets, ... }: {
|
|
|
|
|
|
|
|
services.postgresql = {
|
|
|
|
enable = true;
|
2022-06-22 20:16:57 +02:00
|
|
|
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.default}/db/postgres/${config.services.postgresql.package.psqlSchema}";
|
2022-06-21 01:47:36 +02:00
|
|
|
# settings = {};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.pgadmin = {
|
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
2022-11-08 14:20:33 +01:00
|
|
|
initialEmail = "h7x4@nani.wtf";
|
2022-06-22 20:16:57 +02:00
|
|
|
initialPasswordFile = "${config.machineVars.dataDrives.default}/var/pgadmin_pass";
|
|
|
|
port = secrets.ports.pgadmin;
|
|
|
|
settings = {
|
|
|
|
DATA_DIR = "${config.machineVars.dataDrives.default}/var/pgadmin";
|
|
|
|
};
|
2022-06-21 01:47:36 +02:00
|
|
|
};
|
2022-11-08 14:20:33 +01:00
|
|
|
|
|
|
|
services.postgresqlBackup = {
|
|
|
|
enable = true;
|
|
|
|
location = "${config.machineVars.dataDrives.default}/backup/postgres";
|
|
|
|
backupAll = true;
|
|
|
|
};
|
2022-06-21 01:47:36 +02:00
|
|
|
}
|