summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMats Rauhala <mats.rauhala@iki.fi>2021-12-11 15:01:15 +0200
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2021-12-11 21:01:11 +0000
commit0f97e2110fcf132c42ce243cff6540779a10c853 (patch)
treeb639f078aee9cb3a895afa0e3fc1a6d4017f2ea1
parentFix the syntax error on tt-rss config file (diff)
downloadnixpkgs-0f97e2110fcf132c42ce243cff6540779a10c853.tar.gz
tt-rss-module handle situations without any passwordorigin/backport-148696-to-release-21.11
(cherry picked from commit 0eaecd60cb90f6c7247751cee304476869a72fd1)
-rw-r--r--nixos/modules/services/web-apps/tt-rss.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/web-apps/tt-rss.nix b/nixos/modules/services/web-apps/tt-rss.nix
index 97a6a8d3f6c4..9aa38ab25c9a 100644
--- a/nixos/modules/services/web-apps/tt-rss.nix
+++ b/nixos/modules/services/web-apps/tt-rss.nix
@@ -22,7 +22,7 @@ let
else if (cfg.database.passwordFile != null) then
"file_get_contents('${cfg.database.passwordFile}')"
else
- ""
+ null
;
in pkgs.writeText "config.php" ''
<?php
@@ -40,7 +40,7 @@ let
putenv('TTRSS_DB_HOST=${optionalString (cfg.database.host != null) cfg.database.host}');
putenv('TTRSS_DB_USER=${cfg.database.user}');
putenv('TTRSS_DB_NAME=${cfg.database.name}');
- putenv('TTRSS_DB_PASS=' . ${password});
+ putenv('TTRSS_DB_PASS=' ${optionalString (password != null) ". ${password}"});
putenv('TTRSS_DB_PORT=${toString dbPort}');
putenv('TTRSS_AUTH_AUTO_CREATE=${boolToString cfg.auth.autoCreate}');