diff --git a/dovecot.nix b/dovecot.nix index a379ad5..e112293 100644 --- a/dovecot.nix +++ b/dovecot.nix @@ -168,7 +168,7 @@ in { description = "Host to which spam/ham will be forwarded."; }; port = mkOption { - type = str; + type = port; description = "Port to which spam/ham will be forwarded."; }; }; @@ -259,8 +259,9 @@ in { pkgs.writeShellApplication { name = "rspamd_${msg}"; runtimeInputs = with pkgs; [ rspamd ]; - text = - "exec rspamc -h ${cfg.rspamd.host}:${cfg.rspamd.port} ${msg}"; + text = "exec rspamc -h ${cfg.rspamd.host}:${ + toString cfg.rspamd.port + } ${msg}"; }; learnHam = teachRspamd "learn_ham"; learnSpam = teachRspamd "learn_spam";