summary refs log tree commit diff
path: root/nixos/modules/services/mail/dovecot.nix
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2019-08-24 16:52:17 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2019-08-27 18:55:55 +0200
commit56a7bc05e1265a2ef964f25a5df2de2f1f776df2 (patch)
treeaaba74560e6102243c2cc8f3ee4130f167f70e16 /nixos/modules/services/mail/dovecot.nix
parentc09bc3e7e2f29b860bc554e04176953989a5b940 (diff)
downloadnixpkgs-56a7bc05e1265a2ef964f25a5df2de2f1f776df2.tar
nixpkgs-56a7bc05e1265a2ef964f25a5df2de2f1f776df2.tar.gz
nixpkgs-56a7bc05e1265a2ef964f25a5df2de2f1f776df2.tar.bz2
nixpkgs-56a7bc05e1265a2ef964f25a5df2de2f1f776df2.tar.lz
nixpkgs-56a7bc05e1265a2ef964f25a5df2de2f1f776df2.tar.xz
nixpkgs-56a7bc05e1265a2ef964f25a5df2de2f1f776df2.tar.zst
nixpkgs-56a7bc05e1265a2ef964f25a5df2de2f1f776df2.zip
nixos/treewide: drop dependencies to `keys.target`
The `keys.target` is used to indicate whether all NixOps keys were
successfully uploaded on an unattended reboot. However this can cause
startup issues e.g. with NixOS containers (see #67265) and can block
boots even though this might not be needed (e.g. with a dovecot2
instance running that doesn't need any of the NixOps keys).

As described in the NixOps manual[1], dependencies to keys should be
defined like this now:

``` nix
{
  systemd.services.myservice = {
    after = [ "secret-key.service" ];
    wants = [ "secret-key.service" ];
  };
}
```

However I'd leave the issue open until it's discussed whether or not to
keep `keys.target` in `nixpkgs`.

[1] https://nixos.org/nixops/manual/#idm140737322342384
Diffstat (limited to 'nixos/modules/services/mail/dovecot.nix')
-rw-r--r--nixos/modules/services/mail/dovecot.nix3
1 files changed, 1 insertions, 2 deletions
diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix
index 139011dca23..cdbb776454b 100644
--- a/nixos/modules/services/mail/dovecot.nix
+++ b/nixos/modules/services/mail/dovecot.nix
@@ -344,8 +344,7 @@ in
     systemd.services.dovecot2 = {
       description = "Dovecot IMAP/POP3 server";
 
-      after = [ "keys.target" "network.target" ];
-      wants = [ "keys.target" ];
+      after = [ "network.target" ];
       wantedBy = [ "multi-user.target" ];
       restartTriggers = [ cfg.configFile ];