0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 14:10:33 +03:00
nixpkgs/nixos/tests/roundcube.nix
Wolfgang Walther 41c5662cbe
nixos/postgresql: move postStart into separate unit
This avoids restarting the postgresql server, when only ensureDatabases
or ensureUsers have been changed. It will also allow to properly wait
for recovery to finish later.

To wait for "postgresql is ready" in other services, we now provide a
postgresql.target.

Resolves #400018

Co-authored-by: Marcel <me@m4rc3l.de>
2025-06-24 15:26:47 +02:00

38 lines
971 B
Nix

{ pkgs, ... }:
{
name = "roundcube";
meta = with pkgs.lib.maintainers; {
maintainers = [ globin ];
};
nodes = {
roundcube =
{ config, pkgs, ... }:
{
services.roundcube = {
enable = true;
hostName = "roundcube";
database.password = "not production";
package = pkgs.roundcube.withPlugins (plugins: [ plugins.persistent_login ]);
plugins = [ "persistent_login" ];
dicts = with pkgs.aspellDicts; [
en
fr
de
];
};
services.nginx.virtualHosts.roundcube = {
forceSSL = false;
enableACME = false;
};
};
};
testScript = ''
roundcube.start
roundcube.wait_for_unit("postgresql.target")
roundcube.wait_for_unit("phpfpm-roundcube.service")
roundcube.wait_for_unit("nginx.service")
roundcube.succeed("curl -sSfL http://roundcube/ | grep 'Keep me logged in'")
'';
}