From e84ac26208f514337df9482f3356d6727f3673fa Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Sun, 6 Jun 2021 01:18:57 +0200 Subject: [PATCH] Install mailman --- nixos/machines/hera/configuration.nix | 1 + nixos/roles/mailman.nix | 32 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 nixos/roles/mailman.nix diff --git a/nixos/machines/hera/configuration.nix b/nixos/machines/hera/configuration.nix index a3f42c0a..070d8fb1 100644 --- a/nixos/machines/hera/configuration.nix +++ b/nixos/machines/hera/configuration.nix @@ -25,6 +25,7 @@ in ../../roles/laminar ../../roles/kassandra-server.nix ../../roles/foundryvtt.nix + ../../roles/mailman.nix ../../roles/home-assistant ./web.nix ./mail.nix diff --git a/nixos/roles/mailman.nix b/nixos/roles/mailman.nix new file mode 100644 index 00000000..3f5bae1b --- /dev/null +++ b/nixos/roles/mailman.nix @@ -0,0 +1,32 @@ +{ ... }: +let + hostname = "lists.maralorn.de"; + admin = "admin@maralorn.de"; +in +{ + services = { + mailman = { + enable = true; + webHosts = [ hostname ]; + serve.enable = true; + enablePostfix = true; + siteOwner = admin; + }; + postfix = { + relayDomains = [ "hash:/var/lib/mailman/data/postfix_domains" ]; + config = + let + lmtp = [ "hash:/var/lib/mailman/data/postfix_lmtp" ]; + in + { + transport_maps = lmtp; + local_recipient_maps = lmtp; + }; + }; + nginx.virtualHosts.${hostname} = { + enableACME = true; + forceSSL = true; + }; + }; + +}