kusakabe: add postgresql for twitterchiver
This commit is contained in:
parent
2b4f4d6b16
commit
4b878360f5
1 changed files with 21 additions and 0 deletions
|
@ -94,6 +94,9 @@ in {
|
|||
|
||||
# k8s
|
||||
80 443 6443 22623
|
||||
|
||||
# PostgreSQL
|
||||
5432
|
||||
];
|
||||
allowedTCPPorts = [ 80 443 ];
|
||||
};
|
||||
|
@ -259,5 +262,23 @@ in {
|
|||
};
|
||||
users.users.lukegb.extraGroups = lib.mkAfter [ "libvirtd" ];
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
authentication = ''
|
||||
host all all 137.74.77.21/32 md5
|
||||
host all all 137.74.77.22/32 md5
|
||||
host all all 137.74.77.23/32 md5
|
||||
'';
|
||||
ensureDatabases = [
|
||||
"twitterchiver"
|
||||
];
|
||||
ensureUsers = [{
|
||||
name = "twitterchiver";
|
||||
ensurePermissions = { "DATABASE twitterchiver" = "ALL PRIVILEGES"; };
|
||||
}];
|
||||
enableTCPIP = true;
|
||||
};
|
||||
services.postgresqlBackup.enable = true;
|
||||
|
||||
system.stateVersion = "20.03";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue