diff options
author | Andreas Brinner <andreas@everlanes.net> | 2023-04-23 12:16:43 +0200 |
---|---|---|
committer | Andreas Brinner <andreas@everlanes.net> | 2023-04-23 13:11:28 +0200 |
commit | 279eeae178543bfd0a8b5f04793f586699f64555 (patch) | |
tree | 6f4d1721e436f64aa787b9fe767cbc76df26f998 /nixos | |
parent | 2af4a9bc09bccb74cda5eefb98193b4bbbb0eba5 (diff) |
nixos/roundcube: fix roundcube-setup start
When using Roundcube with a non local PostgreSQL database wait for network start before running roundcube-setup.service Otherwise the database is not reachable and the service fails.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/mail/roundcube.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix index 70ec3707dc187..09c31181491cb 100644 --- a/nixos/modules/services/mail/roundcube.nix +++ b/nixos/modules/services/mail/roundcube.nix @@ -231,6 +231,7 @@ in path = [ config.services.postgresql.package ]; }) { + after = [ "network-online.target" ]; wantedBy = [ "multi-user.target" ]; script = let psql = "${lib.optionalString (!localDB) "PGPASSFILE=${cfg.database.passwordFile}"} ${pkgs.postgresql}/bin/psql ${lib.optionalString (!localDB) "-h ${cfg.database.host} -U ${cfg.database.username} "} ${cfg.database.dbname}"; |