From 9cbe30e129c8ddaa2159532c3174a346761a8358 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 5 Oct 2020 00:09:28 +0200 Subject: [PATCH] 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. --- nixos/modules/services/web-apps/nextcloud.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 5daa7bdea20..bf65189f6a7 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -427,7 +427,7 @@ in { then ''"$(<"${toString c.dbpassFile}")"'' else if c.dbpass != null then ''"${toString c.dbpass}"'' - else null; + else ''""''; adminpass = if c.adminpassFile != null then ''"$(<"${toString c.adminpassFile}")"'' else ''"${toString c.adminpass}"''; @@ -441,8 +441,7 @@ in { ${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.dbuser != null then "--database-user" else null} = ''"${c.dbuser}"''; - ${if (any (x: x != null) [c.dbpass c.dbpassFile]) - then "--database-pass" else null} = dbpass; + "--database-pass" = dbpass; ${if c.dbtableprefix != null then "--database-table-prefix" else null} = ''"${toString c.dbtableprefix}"''; "--admin-user" = ''"${c.adminuser}"'';