about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorAndreas Brinner <andreas@everlanes.net>2023-04-23 14:05:40 +0200
committerAndreas Brinner <andreas@everlanes.net>2023-04-23 14:05:40 +0200
commit78fb35ce39b9f4db45999457c170f65ed153f3eb (patch)
tree4f25dd4f04d8b67b0e86bfe677582fa715c3aa0a /nixos
parent279eeae178543bfd0a8b5f04793f586699f64555 (diff)
nixos/roundcube: extend documentation for passwordFile
The passwordFile must be formatted correctly. Added some information
about how the file content should look like.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/mail/roundcube.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix
index 09c31181491cb..ecf4d3ebc4d84 100644
--- a/nixos/modules/services/mail/roundcube.nix
+++ b/nixos/modules/services/mail/roundcube.nix
@@ -70,7 +70,11 @@ in
       };
       passwordFile = mkOption {
         type = types.str;
-        description = lib.mdDoc "Password file for the postgresql connection. Must be readable by user `nginx`. Ignored if `database.host` is set to `localhost`, as peer authentication will be used.";
+        description = lib.mdDoc ''
+          Password file for the postgresql connection.
+          Must be formated according to PostgreSQL .pgpass standard (see https://www.postgresql.org/docs/current/libpq-pgpass.html)
+          and readable by user `nginx`. Ignored if `database.host` is set to `localhost`, as peer authentication will be used.
+        '';
       };
       dbname = mkOption {
         type = types.str;
@@ -124,8 +128,6 @@ in
       <?php
 
       ${lib.optionalString (!localDB) ''
-        # Password file should be formated according to PostgreSQL .pgpass standard
-        # see https://www.postgresql.org/docs/current/libpq-pgpass.html
         $password = file_get_contents('${cfg.database.passwordFile}');
         $password = preg_split('~\\\\.(*SKIP)(*FAIL)|\:~s', $password);
         $password = end($password);