From 279eeae178543bfd0a8b5f04793f586699f64555 Mon Sep 17 00:00:00 2001 From: Andreas Brinner Date: Sun, 23 Apr 2023 12:16:43 +0200 Subject: 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. --- nixos/modules/services/mail/roundcube.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'nixos/modules/services/mail') 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}"; -- cgit 1.4.1