diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix index 3a05ff89..c99c7a60 100644 --- a/nixbld-etc-nixos/configuration.nix +++ b/nixbld-etc-nixos/configuration.nix @@ -19,6 +19,10 @@ in ./github-backup-module.nix ./afws-module.nix ./rt.nix + (builtins.fetchTarball { + url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/15cf252a0dfffb2420a60fbd6be3467c11026142/nixos-mailserver-nixos.tar.gz"; + sha256 = "sha256:07c844h8iw0l6l1d5cb29qmfa7nwzxbwq5llnyk6hh913h775csc"; + }) ]; boot.loader.grub.enable = true; @@ -825,5 +829,17 @@ in }; }; + mailserver = { + enable = true; + localDnsResolver = false; # conflicts with dnsmasq + # Some mail servers do reverse DNS lookups to filter spam. + # Getting a proper reverse DNS record from ISP is difficult, so use whatever already exists. + fqdn = "42-200-147-171.static.imsbiz.com"; + domains = [ "nmigen.org" ]; + loginAccounts = (import /etc/nixos/secret/email_accounts.nix); + certificateScheme = 3; + }; + security.acme.certs."${config.mailserver.fqdn}".extraDomainNames = [ "mail.nmigen.org" ]; + system.stateVersion = "21.05"; }