From 6a600b1c22268198df93e977c5d32696da9291b9 Mon Sep 17 00:00:00 2001 From: ft Date: Sat, 19 Oct 2019 16:08:54 -0700 Subject: [PATCH 1/2] roundcube: fix -- quoting string env variable --- nixos/modules/services/mail/roundcube.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix index bdedfa1bb70..36dda619ad0 100644 --- a/nixos/modules/services/mail/roundcube.nix +++ b/nixos/modules/services/mail/roundcube.nix @@ -160,7 +160,7 @@ in ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} psql postgres -c "create role ${cfg.database.username} with login password '${cfg.database.password}'"; ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} psql postgres -c "create database ${cfg.database.dbname} with owner ${cfg.database.username}"; fi - PGPASSWORD=${cfg.database.password} ${pkgs.postgresql}/bin/psql -U ${cfg.database.username} \ + PGPASSWORD="${cfg.database.password}" ${pkgs.postgresql}/bin/psql -U ${cfg.database.username} \ -f ${cfg.package}/SQL/postgres.initial.sql \ -h ${cfg.database.host} ${cfg.database.dbname} touch /var/lib/roundcube/db-created From ddc35b13f60f2c8f83e7bc87bc18aacebdf6fe45 Mon Sep 17 00:00:00 2001 From: Donal Cahill Date: Mon, 4 Nov 2019 10:03:00 +0000 Subject: [PATCH 2/2] roundcube: tests - add space to db password, check setup script worked --- nixos/tests/roundcube.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/tests/roundcube.nix b/nixos/tests/roundcube.nix index ed0ebd7dd19..76b735a8c74 100644 --- a/nixos/tests/roundcube.nix +++ b/nixos/tests/roundcube.nix @@ -9,7 +9,7 @@ import ./make-test.nix ({ pkgs, ...} : { services.roundcube = { enable = true; hostName = "roundcube"; - database.password = "notproduction"; + database.password = "not production"; package = pkgs.roundcube.withPlugins (plugins: [ plugins.persistent_login ]); plugins = [ "persistent_login" ]; }; @@ -23,6 +23,7 @@ import ./make-test.nix ({ pkgs, ...} : { testScript = '' $roundcube->start; $roundcube->waitForUnit("postgresql.service"); + $roundcube->waitForUnit("roundcube-setup.service"); $roundcube->waitForUnit("phpfpm-roundcube.service"); $roundcube->waitForUnit("nginx.service"); $roundcube->succeed("curl -sSfL http://roundcube/ | grep 'Keep me logged in'");