summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-04-05 10:10:51 +0000
committerAlyssa Ross <hi@alyssa.is>2022-04-20 13:17:28 +0000
commit572131c6a945069dba5a12a0354df8254224a458 (patch)
treeeef8ebcba8d5bec6dabf9286a1e2105d37d006df /nixos
parentfb2fa1b50fe32e4d4f4e251b5892598f38f40a71 (diff)
downloadnixpkgs-572131c6a945069dba5a12a0354df8254224a458.tar
nixpkgs-572131c6a945069dba5a12a0354df8254224a458.tar.gz
nixpkgs-572131c6a945069dba5a12a0354df8254224a458.tar.bz2
nixpkgs-572131c6a945069dba5a12a0354df8254224a458.tar.lz
nixpkgs-572131c6a945069dba5a12a0354df8254224a458.tar.xz
nixpkgs-572131c6a945069dba5a12a0354df8254224a458.tar.zst
nixpkgs-572131c6a945069dba5a12a0354df8254224a458.zip
nixos/mailman: ensure Postfix is started after Mailman
On first run, Postfix will refuse to start if it's started before
Mailman is up, because it'll try to read the map files generated
Mailman the first time it's started, and they won't exist yet.  To fix
this, make sure Postfix isn't started until after Mailman is up if
they're both activated at the same time.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/mail/mailman.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/mail/mailman.nix b/nixos/modules/services/mail/mailman.nix
index f36abadf9d7..eee413df56d 100644
--- a/nixos/modules/services/mail/mailman.nix
+++ b/nixos/modules/services/mail/mailman.nix
@@ -313,6 +313,7 @@ in {
     systemd.services = {
       mailman = {
         description = "GNU Mailman Master Process";
+        before = lib.optional cfg.enablePostfix "postfix.service";
         after = [ "network.target" ]
           ++ lib.optional cfg.enablePostfix "postfix-setup.service";
         restartTriggers = [ config.environment.etc."mailman.cfg".source ];