Add admin ports & service

This commit is contained in:
niten 2023-10-13 12:57:58 -07:00
parent 6b3c44613f
commit 9bcfef6ab0
1 changed files with 28 additions and 1 deletions

View File

@ -43,6 +43,16 @@ in {
description = "Port on which to serve metrics data.";
default = 5034;
};
admin = mkOption {
type = port;
description = "Port on which to listen for admin requests.";
default = 5925;
};
http-admin = mkOption {
type = nullOr port;
description = "Port on which to listen for admin HTTP API requests.";
default = null;
};
};
mail-user = mkOption {
@ -386,7 +396,7 @@ in {
mail_plugins = $mail_plugins sieve fts fts_solr
}
plugin {
plugins {
fts = solr
fts_solr = url=http://${cfg.solr.host}:${
toString cfg.solr.port
@ -445,6 +455,23 @@ in {
inbox = yes
}
service doveadm {
unix_listener doveadm-server {
user = ${config.services.dovecot2.user}
group = ${config.services.dovecot2.group}
}
inet_listener {
port = ${toString cfg.ports.admin}
}
${
optionalString (!isNull cfg.ports.http-admin) ''
inet_listener http {
port = ${toString cfg.ports.http-admin}
}
''
}
}
plugin {
sieve_plugins = sieve_imapsieve sieve_extprograms
sieve = file:${cfg.state-directory}/sieves/%u/scripts;active=${cfg.state-directory}/sieves/%u/active.sieve