type of port should be port...

This commit is contained in:
niten 2023-09-24 14:16:59 -07:00
parent d0e9b3651d
commit a97bcd112f
1 changed files with 4 additions and 3 deletions

View File

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