1
0
Fork 0

use correct postgresql option

This commit is contained in:
ibizaman 2023-11-05 04:48:39 -08:00
parent a49d9113f4
commit a05f9d6942
2 changed files with 5 additions and 5 deletions

View file

@ -52,7 +52,7 @@ in
dbConfig = passwordCfgs: { dbConfig = passwordCfgs: {
services.postgresql.enable = (builtins.length passwordCfgs) > 0; services.postgresql.enable = (builtins.length passwordCfgs) > 0;
services.postgresql.ensureDatabases = map ({ database, ... }: database) passwordCfgs; services.postgresql.ensureDatabases = map ({ database, ... }: database) passwordCfgs;
services.postgresql.Users = map ({ username, database, ... }: { services.postgresql.ensureUsers = map ({ username, database, ... }: {
name = username; name = username;
ensurePermissions = { ensurePermissions = {
"DATABASE ${database}" = "ALL PRIVILEGES"; "DATABASE ${database}" = "ALL PRIVILEGES";

View file

@ -28,7 +28,7 @@ in
expected = { expected = {
services.postgresql = { services.postgresql = {
enable = false; enable = false;
Users = []; ensureUsers = [];
ensureDatabases = []; ensureDatabases = [];
}; };
systemd.services.postgresql.postStart = ""; systemd.services.postgresql.postStart = "";
@ -40,7 +40,7 @@ in
expected = { expected = {
services.postgresql = { services.postgresql = {
enable = true; enable = true;
Users = [{ ensureUsers = [{
name = "myuser"; name = "myuser";
ensurePermissions = { ensurePermissions = {
"DATABASE mydatabase" = "ALL PRIVILEGES"; "DATABASE mydatabase" = "ALL PRIVILEGES";
@ -67,7 +67,7 @@ in
expected = { expected = {
services.postgresql = { services.postgresql = {
enable = true; enable = true;
Users = [{ ensureUsers = [{
name = "myuser"; name = "myuser";
ensurePermissions = { ensurePermissions = {
"DATABASE mydatabase" = "ALL PRIVILEGES"; "DATABASE mydatabase" = "ALL PRIVILEGES";
@ -104,7 +104,7 @@ in
expected = { expected = {
services.postgresql = { services.postgresql = {
enable = false; enable = false;
Users = []; ensureUsers = [];
ensureDatabases = []; ensureDatabases = [];
enableTCPIP = true; enableTCPIP = true;