✨ [pi4] Added initial Simple mailserver config
This commit is contained in:
@ -4,11 +4,13 @@ let
|
||||
in
|
||||
{
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
email = "cert@${domain}";
|
||||
virtualHosts =
|
||||
let
|
||||
reverseProxy = port: "reverse_proxy localhost:${builtins.toString port}";
|
||||
localProxy = proxyTo "localhost";
|
||||
homelabProxy = proxyTo "192.168.10.231";
|
||||
proxyTo = ip: port: "reverse_proxy ${ip}:${builtins.toString port}";
|
||||
redirect = subdomain: "redir https://${subdomain}.${domain}{uri}";
|
||||
in
|
||||
{
|
||||
@ -23,62 +25,66 @@ in
|
||||
'';
|
||||
# Gitea
|
||||
"code.${domain}".extraConfig = ''
|
||||
${reverseProxy 3000}
|
||||
${homelabProxy 3000}
|
||||
'';
|
||||
# Forgejo
|
||||
"beta.code.${domain}".extraConfig = ''
|
||||
${localProxy 8001}
|
||||
'';
|
||||
# Nextcloud
|
||||
"nextcloud.${domain}".extraConfig = ''
|
||||
redir /.well-known/carddav /remote.php/dav 301
|
||||
redir /.well-known/caldav /remote.php/dav 301
|
||||
${reverseProxy 11000}
|
||||
${homelabProxy 11000}
|
||||
'';
|
||||
# Kitchenowl
|
||||
"grocery.${domain}".extraConfig = ''
|
||||
${reverseProxy 800}
|
||||
${homelabProxy 800}
|
||||
'';
|
||||
# Actual Budget
|
||||
"budget.${domain}".extraConfig = ''
|
||||
${reverseProxy 5006}
|
||||
${homelabProxy 5006}
|
||||
'';
|
||||
# Uptime Kuma
|
||||
"status.${domain}".extraConfig = ''
|
||||
${reverseProxy 3001}
|
||||
${homelabProxy 3001}
|
||||
'';
|
||||
# Headscale
|
||||
"vpn.${domain}".extraConfig = ''
|
||||
reverse_proxy /web* localhost:8084
|
||||
reverse_proxy * localhost:8082
|
||||
reverse_proxy /web* 192.168.10.231:8084
|
||||
reverse_proxy * 192.168.10.231:8082
|
||||
'';
|
||||
# Headscale SmartDNS
|
||||
"dns.${domain}".extraConfig = ''
|
||||
${reverseProxy 8082}
|
||||
${homelabProxy 8082}
|
||||
'';
|
||||
# FreshRSS
|
||||
"rss.${domain}".extraConfig = ''
|
||||
${reverseProxy 8085}
|
||||
${homelabProxy 8085}
|
||||
'';
|
||||
# Ente backend
|
||||
"api.ente.${domain}".extraConfig = ''
|
||||
${reverseProxy 8083}
|
||||
${homelabProxy 8083}
|
||||
'';
|
||||
# Ente Photos frontend
|
||||
"ente.${domain}".extraConfig = ''
|
||||
${reverseProxy 3003}
|
||||
${homelabProxy 3003}
|
||||
'';
|
||||
# Ente Auth frontend
|
||||
"mfa.${domain}".extraConfig = ''
|
||||
${reverseProxy 3004}
|
||||
${homelabProxy 3004}
|
||||
'';
|
||||
# Homepage / portfolio
|
||||
"${domain}".extraconfig = ''
|
||||
${reverseProxy 4321}
|
||||
"${domain}".extraConfig = ''
|
||||
${homelabProxy 4321}
|
||||
'';
|
||||
# Yamtrack
|
||||
"track.${domain}".extraConfig = ''
|
||||
${reverseProxy 8090}
|
||||
${homelabProxy 8090}
|
||||
'';
|
||||
# Postal
|
||||
"mail.${domain}".extraConfig = ''
|
||||
${reverseProxy 5000}
|
||||
# Donetick
|
||||
"chore.${domain}".extraConfig = ''
|
||||
${homelabProxy 2021}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user