This commit is contained in:
Daniel Flanagan 2023-07-28 16:42:24 -05:00
parent b0a1e5f981
commit 680087f30d
Signed by: lytedev
GPG Key ID: 5B2020A0F9921EF4
1 changed files with 5 additions and 10 deletions

View File

@ -341,7 +341,7 @@
services.postgresql = {
enable = true;
ensureDatabases = [ "daniel" "plausible" ];
ensureDatabases = [ "daniel" ];
ensureUsers = [
{
name = "daniel";
@ -349,12 +349,6 @@
"DATABASE daniel" = "ALL PRIVILEGES";
};
}
{
name = "plausible";
ensurePermissions = {
"DATABASE plausible" = "ALL PRIVILEGES";
};
}
];
dataDir = "/storage/postgres";
enableTCPIP = true;
@ -364,6 +358,7 @@
authentication = pkgs.lib.mkOverride 10 ''
#type database DBuser auth-method
local all postgres peer map=superuser_map
local all daniel peer map=superuser_map
local sameuser all peer map=superuser_map
local plausible plausible peer map=superuser_map
@ -376,9 +371,9 @@
identMap = ''
# ArbitraryMapName systemUser DBUser
superuser_map root postgres
superuser_map postgres postgres
superuser_map daniel postgres
superuser_map root postgres
superuser_map postgres postgres
superuser_map daniel postgres
# Let other names login as themselves
superuser_map /^(.*)$ \1
'';