global/security: move common config to global/common

This commit is contained in:
Infinidoge 2024-05-12 00:02:54 -04:00
parent 095523516d
commit df67046cb8
Signed by: Infinidoge
SSH key fingerprint: SHA256:GT2StvPQMMfFHyiiFJymQxfTG/z6EWLJ6NWItf5K5sA
2 changed files with 45 additions and 43 deletions

45
modules/global/common.nix Normal file
View file

@ -0,0 +1,45 @@
{ ... }:
{
common = rec {
domain = "inx.moe";
subdomain = subdomain: "${subdomain}.${domain}";
nginx = rec {
ssl-cert = {
enableACME = true;
acmeRoot = null;
};
ssl-optional = ssl-cert // {
addSSL = true;
};
ssl = ssl-cert // {
forceSSL = true;
};
};
rsyncnet = rec {
account = "de3482";
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;
};
};
};
}

View file

@ -60,47 +60,4 @@ with lib;
# For permission to access smtp password
users.groups.smtp = { };
common = rec {
domain = "inx.moe";
subdomain = subdomain: "${subdomain}.${domain}";
nginx = rec {
ssl-cert = {
enableACME = true;
acmeRoot = null;
};
ssl-optional = ssl-cert // {
addSSL = true;
};
ssl = ssl-cert // {
forceSSL = true;
};
};
rsyncnet = rec {
account = "de3482";
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;
};
};
};
}