about summary refs log tree commit diff
path: root/nixos/modules/services/mail
diff options
context:
space:
mode:
authorAndreas Brinner <andreas@everlanes.net>2023-04-23 12:16:43 +0200
committerAndreas Brinner <andreas@everlanes.net>2023-04-23 13:11:28 +0200
commit279eeae178543bfd0a8b5f04793f586699f64555 (patch)
tree6f4d1721e436f64aa787b9fe767cbc76df26f998 /nixos/modules/services/mail
parent2af4a9bc09bccb74cda5eefb98193b4bbbb0eba5 (diff)
downloadnixlib-279eeae178543bfd0a8b5f04793f586699f64555.tar
nixlib-279eeae178543bfd0a8b5f04793f586699f64555.tar.gz
nixlib-279eeae178543bfd0a8b5f04793f586699f64555.tar.bz2
nixlib-279eeae178543bfd0a8b5f04793f586699f64555.tar.lz
nixlib-279eeae178543bfd0a8b5f04793f586699f64555.tar.xz
nixlib-279eeae178543bfd0a8b5f04793f586699f64555.tar.zst
nixlib-279eeae178543bfd0a8b5f04793f586699f64555.zip
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/modules/services/mail')
-rw-r--r--nixos/modules/services/mail/roundcube.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix
index 70ec3707dc18..09c31181491c 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}";