hosts/plover: enable TCP/IP connection and fix database service

This commit is contained in:
Gabriel Arazas 2022-12-01 08:21:58 +08:00
parent acfc617e10
commit d4c45fd86b

View File

@ -103,13 +103,14 @@ in
services.postgresql = { services.postgresql = {
enable = true; enable = true;
package = pkgs.postgresql_15; package = pkgs.postgresql_15;
enableTCPIP = true;
# There's no database and user checks for Vaultwarden service. # There's no database and user checks for Vaultwarden service.
ensureDatabases = [ vaultwardenDbName ]; ensureDatabases = [ vaultwardenDbName ];
ensureUsers = [ ensureUsers = [
{ {
name = vaultwardenUser; name = vaultwardenUser;
ensurePermissions = { "DATABASE ${vaultwardenDbName}" = "ALL PRIVILEGES"; }; ensurePermissions."DATABASE ${vaultwardenDbName}" = "ALL PRIVILEGES";
} }
]; ];
}; };
@ -223,7 +224,7 @@ in
# Configuring the database. Take note it is required to create a password # Configuring the database. Take note it is required to create a password
# for the user. # for the user.
DATABASE_URL = "postgresql://${vaultwardenUser}:thisismadnessbutsomeonewilljustseethisanyways32342whaaaaaatthebloooooodyhell49@localhost/${vaultwardenDbName}"; DATABASE_URL = "postgresql://${vaultwardenUser}@/${vaultwardenDbName}";
}; };
}; };