2023-01-24 18:19:28 +00:00
|
|
|
{ config, ... }: {
|
|
|
|
services.traefik = {
|
|
|
|
enable = true;
|
|
|
|
staticConfigOptions = {
|
|
|
|
log = { level = "WARN"; };
|
|
|
|
certificatesResolvers = {
|
|
|
|
godaddy = {
|
|
|
|
acme = {
|
|
|
|
email = "dev@lanakk.com";
|
|
|
|
storage = "/var/lib/traefik/acme.json";
|
|
|
|
dnsChallenge = { provider = "godaddy"; };
|
|
|
|
};
|
|
|
|
};
|
2023-02-21 13:52:38 +00:00
|
|
|
lets-encrypt = {
|
|
|
|
acme = {
|
|
|
|
email = "dev@lanakk.com";
|
|
|
|
storage = "/var/lib/traefik/acme.json";
|
|
|
|
tlsChallenge = {};
|
|
|
|
};
|
|
|
|
};
|
2023-01-24 18:19:28 +00:00
|
|
|
};
|
|
|
|
api = { };
|
|
|
|
entryPoints = {
|
|
|
|
web = {
|
|
|
|
address = ":80";
|
|
|
|
http.redirections.entryPoint = {
|
|
|
|
to = "websecure";
|
|
|
|
scheme = "https";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
websecure = { address = ":443"; };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
dynamicConfigOptions = {
|
|
|
|
http = {
|
|
|
|
middlewares = {
|
|
|
|
auth = {
|
|
|
|
basicAuth = {
|
|
|
|
users = [ "m3tam3re:$apr1$1xqdta2b$DIVNvvp5iTUGNccJjguKh." ];
|
|
|
|
};
|
|
|
|
};
|
2023-02-10 21:36:25 +00:00
|
|
|
nextcloud_redirectregex = {
|
|
|
|
redirectRegex = {
|
|
|
|
permanent = true;
|
|
|
|
regex = "https://(.*)/.well-known/(?:card|cal)dav";
|
|
|
|
replacement = "https://\${1}/remote.php/dav";
|
|
|
|
};
|
|
|
|
};
|
2023-02-21 13:52:38 +00:00
|
|
|
nextcloud_headers = {
|
|
|
|
headers = {
|
|
|
|
referrerPolicy = "no-referrer";
|
|
|
|
stsSeconds = "31536000";
|
|
|
|
forceSTSHeader = true;
|
|
|
|
stsPreload = true;
|
|
|
|
stsIncludeSubdomains = true;
|
|
|
|
};
|
|
|
|
};
|
2023-01-24 18:19:28 +00:00
|
|
|
};
|
|
|
|
services = {
|
|
|
|
baserow.loadBalancer.servers = [{ url = "http://localhost:3001/"; }];
|
|
|
|
gitea.loadBalancer.servers = [{ url = "http://localhost:3000/"; }];
|
|
|
|
n8n.loadBalancer.servers = [{ url = "http://localhost:5678/"; }];
|
2023-02-12 15:03:03 +00:00
|
|
|
lanakk_blog.loadBalancer.servers =
|
|
|
|
[{ url = "http://localhost:3002/"; }];
|
2023-02-05 13:36:38 +00:00
|
|
|
matomo.loadBalancer.servers = [{ url = "http://localhost:3003/"; }];
|
2023-02-07 08:29:30 +00:00
|
|
|
searx.loadBalancer.servers = [{ url = "http://localhost:3004/"; }];
|
2023-02-12 15:03:03 +00:00
|
|
|
nextcloud.loadBalancer.servers =
|
|
|
|
[{ url = "http://localhost:3005/"; }];
|
|
|
|
invidious.loadBalancer.servers =
|
|
|
|
[{ url = "http://localhost:3006/"; }];
|
|
|
|
wireguard.loadBalancer.servers =
|
|
|
|
[{ url = "http://localhost:3007/"; }];
|
2023-04-24 17:14:11 +00:00
|
|
|
mautic.loadBalancer.servers = [{ url = "http://localhost:3008/"; }];
|
2023-02-12 15:03:03 +00:00
|
|
|
briefkasten.loadBalancer.servers =
|
|
|
|
[{ url = "http://localhost:3009/"; }];
|
2023-02-13 17:46:38 +00:00
|
|
|
littlelink-lanakk.loadBalancer.servers =
|
|
|
|
[{ url = "http://localhost:3010/"; }];
|
2023-02-13 18:58:05 +00:00
|
|
|
littlelink-m3tam3re.loadBalancer.servers =
|
|
|
|
[{ url = "http://localhost:3011/"; }];
|
2023-02-21 13:52:38 +00:00
|
|
|
http-images.loadBalancer.servers =
|
|
|
|
[{ url = "http://localhost:3012/"; }];
|
|
|
|
syncthing.loadBalancer.servers =
|
|
|
|
[{ url = "http://localhost:8384/"; }];
|
2023-03-28 10:03:26 +00:00
|
|
|
minio.loadBalancer.servers =
|
|
|
|
[{ url = "http://localhost:9000/"; }];
|
2023-03-28 12:53:20 +00:00
|
|
|
minio-console.loadBalancer.servers =
|
|
|
|
[{ url = "http://localhost:9001/"; }];
|
2023-01-24 18:19:28 +00:00
|
|
|
};
|
|
|
|
routers = {
|
|
|
|
api = {
|
|
|
|
rule = "Host(`r.lanakk.com`)";
|
|
|
|
tls = { certResolver = "godaddy"; };
|
|
|
|
service = "api@internal";
|
|
|
|
middlewares = "auth";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
|
|
|
baserow = {
|
|
|
|
rule = "Host(`db.lanakk.com`)";
|
|
|
|
tls = { certResolver = "godaddy"; };
|
|
|
|
service = "baserow";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
|
|
|
gitea = {
|
|
|
|
rule = "Host(`code.lanakk.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "code.lanakk.com";
|
|
|
|
};
|
|
|
|
service = "gitea";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
|
|
|
n8n = {
|
|
|
|
rule = "Host(`wf.lanakk.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "wf.lanakk.com";
|
|
|
|
};
|
|
|
|
service = "n8n";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
2023-02-05 13:36:38 +00:00
|
|
|
lanakk_blog = {
|
|
|
|
rule = "Host(`www.weltkarte-pinnwand.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "www.weltkarte-pinnwand.com";
|
|
|
|
};
|
|
|
|
service = "lanakk_blog";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
|
|
|
matomo = {
|
|
|
|
rule = "Host(`stats.lanakk.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "stats.lanakk.com";
|
|
|
|
};
|
|
|
|
service = "matomo";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
2023-02-21 13:52:38 +00:00
|
|
|
matomo-weltkarte-pinnwand = {
|
|
|
|
rule = "Host(`stats.weltkarte-pinnwand.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "stats.weltkarte-pinnwand.com";
|
|
|
|
};
|
|
|
|
service = "matomo";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
2023-03-28 10:03:26 +00:00
|
|
|
minio = {
|
|
|
|
rule = "Host(`s3.lanakk.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "s3.lanakk.com";
|
|
|
|
};
|
2023-03-28 12:53:20 +00:00
|
|
|
service = "minio";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
|
|
|
minio-console = {
|
|
|
|
rule = "Host(`minio.lanakk.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "minio.lanakk.com";
|
|
|
|
};
|
|
|
|
service = "minio-console";
|
2023-03-28 10:03:26 +00:00
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
2023-02-07 08:29:30 +00:00
|
|
|
searx = {
|
|
|
|
rule = "Host(`search.lanakk.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "search.lanakk.com";
|
|
|
|
};
|
|
|
|
service = "searx";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
|
|
|
invidious = {
|
|
|
|
rule = "Host(`video.lanakk.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "video.lanakk.com";
|
|
|
|
};
|
|
|
|
service = "invidious";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
2023-02-10 21:36:25 +00:00
|
|
|
nextcloud = {
|
|
|
|
rule = "Host(`cloud.lanakk.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "cloud.lanakk.com";
|
|
|
|
};
|
|
|
|
service = "nextcloud";
|
|
|
|
entrypoints = "websecure";
|
2023-02-21 13:52:38 +00:00
|
|
|
middlewares = "nextcloud_redirectregex,nextcloud_headers";
|
2023-02-10 21:36:25 +00:00
|
|
|
};
|
2023-02-08 13:59:00 +00:00
|
|
|
wireguard = {
|
|
|
|
rule = "Host(`wg.lanakk.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "wg.lanakk.com";
|
|
|
|
};
|
|
|
|
service = "wireguard";
|
|
|
|
middlewares = "auth";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
2023-04-24 17:14:11 +00:00
|
|
|
mautic = {
|
|
|
|
rule = "Host(`ma.lanakk.com`)";
|
2023-02-11 21:12:55 +00:00
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
2023-04-24 17:14:11 +00:00
|
|
|
domains = "ma.lanakk.com";
|
2023-02-11 21:12:55 +00:00
|
|
|
};
|
2023-04-26 04:43:46 +00:00
|
|
|
service = "mautic";
|
2023-02-11 21:12:55 +00:00
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
2023-02-12 15:03:03 +00:00
|
|
|
briefkasten = {
|
|
|
|
rule = "Host(`bm.lanakk.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "bm.lanakk.com";
|
|
|
|
};
|
|
|
|
service = "briefkasten";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
2023-02-13 17:46:38 +00:00
|
|
|
littlelink-lanakk = {
|
|
|
|
rule = "Host(`links.lanakk.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "links.lanakk.com";
|
|
|
|
};
|
|
|
|
service = "littlelink-lanakk";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
2023-02-21 13:52:38 +00:00
|
|
|
http-images = {
|
|
|
|
rule = "Host(`media.lanakk.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "media.lanakk.com";
|
|
|
|
};
|
|
|
|
service = "http-images";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
|
|
|
syncthing = {
|
|
|
|
rule = "Host(`sync.lanakk.com`)";
|
|
|
|
tls = {
|
|
|
|
certResolver = "godaddy";
|
|
|
|
domains = "sync.lanakk.com";
|
|
|
|
};
|
|
|
|
service = "syncthing";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
2023-02-13 18:58:05 +00:00
|
|
|
littlelink-m3tm3re = {
|
|
|
|
rule = "Host(`links.m3tam3re.com`)";
|
2023-02-21 13:52:38 +00:00
|
|
|
tls = {
|
|
|
|
certResolver = "lets-encrypt";
|
|
|
|
domains = "links.m3tam3re.com";
|
|
|
|
};
|
2023-02-13 18:58:05 +00:00
|
|
|
service = "littlelink-m3tam3re";
|
|
|
|
entrypoints = "websecure";
|
|
|
|
};
|
2023-01-24 18:19:28 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-02-13 18:58:05 +00:00
|
|
|
systemd.services.traefik.serviceConfig = {
|
|
|
|
EnvironmentFile="${config.age.secrets.traefik-env.path}";
|
|
|
|
};
|
2023-01-24 18:19:28 +00:00
|
|
|
}
|