global/security: move common config to global/common
This commit is contained in:
parent
095523516d
commit
df67046cb8
2 changed files with 45 additions and 43 deletions
45
modules/global/common.nix
Normal file
45
modules/global/common.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue