use correct postgresql option
This commit is contained in:
parent
a49d9113f4
commit
a05f9d6942
2 changed files with 5 additions and 5 deletions
|
@ -52,7 +52,7 @@ in
|
|||
dbConfig = passwordCfgs: {
|
||||
services.postgresql.enable = (builtins.length passwordCfgs) > 0;
|
||||
services.postgresql.ensureDatabases = map ({ database, ... }: database) passwordCfgs;
|
||||
services.postgresql.Users = map ({ username, database, ... }: {
|
||||
services.postgresql.ensureUsers = map ({ username, database, ... }: {
|
||||
name = username;
|
||||
ensurePermissions = {
|
||||
"DATABASE ${database}" = "ALL PRIVILEGES";
|
||||
|
|
|
@ -28,7 +28,7 @@ in
|
|||
expected = {
|
||||
services.postgresql = {
|
||||
enable = false;
|
||||
Users = [];
|
||||
ensureUsers = [];
|
||||
ensureDatabases = [];
|
||||
};
|
||||
systemd.services.postgresql.postStart = "";
|
||||
|
@ -40,7 +40,7 @@ in
|
|||
expected = {
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
Users = [{
|
||||
ensureUsers = [{
|
||||
name = "myuser";
|
||||
ensurePermissions = {
|
||||
"DATABASE mydatabase" = "ALL PRIVILEGES";
|
||||
|
@ -67,7 +67,7 @@ in
|
|||
expected = {
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
Users = [{
|
||||
ensureUsers = [{
|
||||
name = "myuser";
|
||||
ensurePermissions = {
|
||||
"DATABASE mydatabase" = "ALL PRIVILEGES";
|
||||
|
@ -104,7 +104,7 @@ in
|
|||
expected = {
|
||||
services.postgresql = {
|
||||
enable = false;
|
||||
Users = [];
|
||||
ensureUsers = [];
|
||||
ensureDatabases = [];
|
||||
|
||||
enableTCPIP = true;
|
||||
|
|
Loading…
Reference in a new issue