feat: refactored and updated smtp config

This commit is contained in:
Nick 2025-10-22 16:48:50 -05:00
parent 1b98c4eff8
commit c469f48b4e
18 changed files with 79 additions and 105 deletions

View file

@ -62,6 +62,7 @@ let
short = stringType;
hostname = stringType;
tags = listType;
records = genOptions stringType "record";
domains = genOptions stringType "url";
dns = genOptions stringType "provider";
localhost = genOptions stringType "address";
@ -257,9 +258,7 @@ in
instancesFunctions = {
domain0 = "cloudbert.fun";
domain1 = "the-nutrivore.social";
domain2 = "the-nutrivore.com";
domain3 = "uprootnutrition.com";
domain1 = "uprootnutrition.com";
servicePath = "/mnt/media/NAS1";
sopsPath = "/var/lib/secrets";
sslPath = "/var/lib/acme";

View file

@ -1,7 +1,7 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain3
domain1
servicePath
sslPath
sopsPath
@ -10,14 +10,14 @@ let
label = "Forgejo";
name = "forgejo";
subdomain = "source";
domain = "${subdomain}.${domain3}";
domain = "${subdomain}.${domain1}";
in
{
label = label;
name = name;
short = label;
email = {
address0 = "noreply@${domain3}";
address0 = "noreply@${domain1}";
};
sops = {
path0 = "${sopsPath}/${name}";
@ -38,7 +38,7 @@ in
port0 = 3033;
};
ssl = {
cert = "${sslPath}/${subdomain}.${domain3}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain3}/key.pem";
cert = "${sslPath}/${subdomain}.${domain1}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain1}/key.pem";
};
}

View file

@ -1,7 +1,7 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain3
domain1
servicePath
sslPath
sopsPath
@ -10,14 +10,14 @@ let
label = "Mastodon";
name = "mastodon";
subdomain = "social";
domain = "${subdomain}.${domain3}";
domain = "${subdomain}.${domain1}";
in
{
label = label;
name = name;
short = "Mast";
email = {
address0 = "noreply@${domain3}";
address0 = "noreply@${domain}";
};
domains = {
url0 = domain;
@ -37,7 +37,7 @@ in
path2 = "";
};
ssl = {
cert = "${sslPath}/${subdomain}.${domain3}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain3}/key.pem";
cert = "${sslPath}/${subdomain}.${domain1}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain1}/key.pem";
};
}

View file

@ -1,7 +1,7 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain3
domain1
servicePath
sslPath
sopsPath
@ -10,14 +10,14 @@ let
label = "PeerTube";
name = "peertube";
subdomain = "video";
domain = "${subdomain}.${domain3}";
domain = "${subdomain}.${domain1}";
in
{
label = label;
name = name;
short = "Peer";
email = {
address0 = "noreply@${domain3}";
address0 = "noreply@${domain1}";
};
sops = {
path0 = "${sopsPath}/${name}";
@ -40,7 +40,7 @@ in
port4 = 52800;
};
ssl = {
cert = "${sslPath}/${subdomain}.${domain3}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain3}/key.pem";
cert = "${sslPath}/${subdomain}.${domain1}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain1}/key.pem";
};
}

View file

@ -1,31 +0,0 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain3
servicePath
sslPath
sopsPath
;
label = "Postfix";
name = "postfix";
domain = "${name}.${domain3}";
in
{
label = label;
name = name;
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = name;
paths = {
path0 = "${servicePath}/${label}";
};
ssl = {
cert = "${sslPath}/${domain3}/fullchain.pem";
key = "${sslPath}/${domain3}/key.pem";
};
}

View file

@ -1,7 +1,6 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain3
sslPath
sopsPath
;

View file

@ -1,13 +1,25 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
dummy
domain0
domain1
;
name = "smtp";
in
{
hostname = "mail.smtp2go.com";
name = dummy;
hostname = "smtp.migadu.com";
name = name;
ports = {
port0 = 2525;
port0 = 465; # TLS
port1 = 587; # StartTLS
};
email = {
address0 = "noreply@${domain0}";
address1 = "noreply@${domain1}";
};
records = {
record0 = "tls";
record1 = "starttls";
};
}

View file

@ -1,7 +1,7 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain3
domain1
sslPath
sopsPath
;
@ -14,13 +14,13 @@ in
name = name;
short = "upRoot";
email = {
address0 = "nick@${domain3}";
address0 = "nick@${domain1}";
};
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain3;
url0 = domain1;
};
tags = [
name
@ -35,7 +35,7 @@ in
port0 = 1234;
};
ssl = {
cert = "${sslPath}/${domain3}/fullchain.pem";
key = "${sslPath}/${domain3}/key.pem";
cert = "${sslPath}/${domain1}/fullchain.pem";
key = "${sslPath}/${domain1}/key.pem";
};
}

View file

@ -3,8 +3,6 @@ let
inherit (moduleFunctions.instancesFunctions)
domain0
domain1
domain2
domain3
;
label = "Router";
in
@ -15,8 +13,6 @@ in
domains = {
url0 = domain0;
url1 = domain1;
url2 = domain2;
url3 = domain3;
};
dns = {
provider0 = "namecheap";