postgres
This commit is contained in:
parent
b0a1e5f981
commit
680087f30d
1 changed files with 5 additions and 10 deletions
|
@ -341,7 +341,7 @@
|
||||||
|
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ensureDatabases = [ "daniel" "plausible" ];
|
ensureDatabases = [ "daniel" ];
|
||||||
ensureUsers = [
|
ensureUsers = [
|
||||||
{
|
{
|
||||||
name = "daniel";
|
name = "daniel";
|
||||||
|
@ -349,12 +349,6 @@
|
||||||
"DATABASE daniel" = "ALL PRIVILEGES";
|
"DATABASE daniel" = "ALL PRIVILEGES";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
|
||||||
name = "plausible";
|
|
||||||
ensurePermissions = {
|
|
||||||
"DATABASE plausible" = "ALL PRIVILEGES";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
dataDir = "/storage/postgres";
|
dataDir = "/storage/postgres";
|
||||||
enableTCPIP = true;
|
enableTCPIP = true;
|
||||||
|
@ -364,6 +358,7 @@
|
||||||
authentication = pkgs.lib.mkOverride 10 ''
|
authentication = pkgs.lib.mkOverride 10 ''
|
||||||
#type database DBuser auth-method
|
#type database DBuser auth-method
|
||||||
local all postgres peer map=superuser_map
|
local all postgres peer map=superuser_map
|
||||||
|
local all daniel peer map=superuser_map
|
||||||
local sameuser all peer map=superuser_map
|
local sameuser all peer map=superuser_map
|
||||||
local plausible plausible peer map=superuser_map
|
local plausible plausible peer map=superuser_map
|
||||||
|
|
||||||
|
|
Reference in a new issue