nixos/nextcloud: --database-pass must not be empty for pgsql/mysql

This is a breaking change from `nextcloud20`. However, the affected test
is still passing with an unused database password and socket
authentication.
This commit is contained in:
Maximilian Bosch 2020-10-05 00:09:28 +02:00
parent 227ba90b28
commit 9cbe30e129
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E

View File

@ -427,7 +427,7 @@ in {
then ''"$(<"${toString c.dbpassFile}")"'' then ''"$(<"${toString c.dbpassFile}")"''
else if c.dbpass != null else if c.dbpass != null
then ''"${toString c.dbpass}"'' then ''"${toString c.dbpass}"''
else null; else ''""'';
adminpass = if c.adminpassFile != null adminpass = if c.adminpassFile != null
then ''"$(<"${toString c.adminpassFile}")"'' then ''"$(<"${toString c.adminpassFile}")"''
else ''"${toString c.adminpass}"''; else ''"${toString c.adminpass}"'';
@ -441,8 +441,7 @@ in {
${if c.dbhost != null then "--database-host" else null} = ''"${c.dbhost}"''; ${if c.dbhost != null then "--database-host" else null} = ''"${c.dbhost}"'';
${if c.dbport != null then "--database-port" else null} = ''"${toString c.dbport}"''; ${if c.dbport != null then "--database-port" else null} = ''"${toString c.dbport}"'';
${if c.dbuser != null then "--database-user" else null} = ''"${c.dbuser}"''; ${if c.dbuser != null then "--database-user" else null} = ''"${c.dbuser}"'';
${if (any (x: x != null) [c.dbpass c.dbpassFile]) "--database-pass" = dbpass;
then "--database-pass" else null} = dbpass;
${if c.dbtableprefix != null ${if c.dbtableprefix != null
then "--database-table-prefix" else null} = ''"${toString c.dbtableprefix}"''; then "--database-table-prefix" else null} = ''"${toString c.dbtableprefix}"'';
"--admin-user" = ''"${c.adminuser}"''; "--admin-user" = ''"${c.adminuser}"'';