From 17d95203653916be404fb08149af105b13dc7580 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Wed, 8 May 2024 03:40:28 -0400 Subject: [PATCH] global/security: add common email/domain configuration --- modules/global/security.nix | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/modules/global/security.nix b/modules/global/security.nix index f648945..b966db5 100644 --- a/modules/global/security.nix +++ b/modules/global/security.nix @@ -84,7 +84,10 @@ with lib; }; }; - common = { + common = rec { + domain = "inx.moe"; + subdomain = subdomain: "${subdomain}.${domain}"; + nginx = rec { ssl-cert = { enableACME = true; @@ -103,5 +106,24 @@ with lib; user = "${account}s1"; host = "${account}.rsync.net"; }; + + email = rec { + withUser = user: "${user}@${domain}"; + outgoingUser = "noreply"; + incomingUser = "incoming"; + outgoing = withUser outgoingUser; + incoming = withUser incomingUser; + withSubaddress = subaddress: "${outgoingUser}+${subaddress}@${domain}"; + + smtp = { + address = "smtp.purelymail.com"; + SSLTLS = 465; + STARTTLS = 587; + }; + imap = { + address = "imap.purelymail.com"; + port = 993; + }; + }; }; }