nix-cfg/hosts/vps1/services/mailserver.nix
2024-05-16 01:07:17 +03:00

37 lines
719 B
Nix

{ lib, config, data, ...}:
let
inherit (data.host) rootDomain;
inherit (data.services.mailserver) domain;
gitDomain = data.services.git.domain;
in
{
mailserver = {
enable = true;
fqdn = domain;
domains = [
rootDomain
domain
gitDomain
];
certificateScheme = "acme";
enableManageSieve = true;
indexDir = "/var/lib/dovecot/indices";
dkimKeyBits = 4096;
loginAccounts = {
"lgm@${rootDomain}" = {
aliases = [
"lgmrszd@${rootDomain}"
"postmaster@${rootDomain}"
"abuse@${rootDomain}"
];
};
"forgejo@${rootDomain}" = {
aliases = [
"@${gitDomain}"
];
};
};
};
}