fruitbasket/modules/mail/default.nix

26 lines
457 B
Nix
Raw Normal View History

2024-03-12 11:34:16 +01:00
{ config, ... }:
2022-12-17 21:33:45 +01:00
let
hostname = "mail.${config.networking.domain}";
2022-12-17 21:33:45 +01:00
in
{
2024-03-12 11:34:16 +01:00
imports = [
./postfix.nix
./dovecot2.nix
./rspamd.nix
./sogo.nix
./mailman.nix
];
2024-03-12 11:34:16 +01:00
# Get SSL certs for dovecot and postfix via ngnix
services.nginx.virtualHosts."${hostname}" = {
forceSSL = true;
enableACME = true;
2022-12-17 21:33:45 +01:00
};
2024-03-12 11:34:16 +01:00
security.acme.certs."${hostname}" = {
2023-05-25 22:43:16 +02:00
reloadServices = [
"postfix.service"
"dovecot2.service"
];
};
2022-12-17 21:33:45 +01:00
}