2024-01-31 09:41:17 -05:00
|
|
|
{config, ...}: {
|
|
|
|
networking.firewall.allowedTCPPorts = [80 443 8080];
|
|
|
|
sops.secrets.cloudflare-api-key = {};
|
|
|
|
systemd.services.traefik = {
|
|
|
|
environment = {
|
|
|
|
CLOUDFLARE_EMAIL = "jch0tm2e@notohh.dev";
|
|
|
|
};
|
|
|
|
serviceConfig = {
|
|
|
|
EnvironmentFile = [config.sops.secrets.cloudflare-api-key.path];
|
|
|
|
};
|
|
|
|
};
|
2023-06-11 18:24:13 -04:00
|
|
|
services.traefik = {
|
|
|
|
enable = true;
|
|
|
|
dynamicConfigOptions = {
|
|
|
|
http = {
|
|
|
|
routers = {
|
2024-01-31 09:41:17 -05:00
|
|
|
# local
|
2023-06-11 18:24:13 -04:00
|
|
|
api = {
|
|
|
|
rule = "PathPrefix(`/api/`)";
|
|
|
|
entryPoints = ["websecure"];
|
|
|
|
service = "api@internal";
|
|
|
|
};
|
2023-11-11 16:27:11 -05:00
|
|
|
homepage = {
|
2023-10-03 15:48:48 -04:00
|
|
|
rule = "Host(`dashboard.internal.flake.sh`)";
|
2024-01-31 09:41:17 -05:00
|
|
|
entrypoints = ["websecure"];
|
2023-11-11 16:27:11 -05:00
|
|
|
service = "homepage";
|
2024-01-31 09:41:17 -05:00
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
2023-06-14 03:58:30 -04:00
|
|
|
};
|
2023-06-13 12:11:08 -04:00
|
|
|
stash = {
|
2023-10-03 15:48:48 -04:00
|
|
|
rule = "Host(`stash.internal.flake.sh`)";
|
2024-01-31 09:41:17 -05:00
|
|
|
entrypoints = ["websecure"];
|
2023-06-13 12:11:08 -04:00
|
|
|
service = "stash";
|
2024-01-31 09:41:17 -05:00
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
2023-06-13 12:11:08 -04:00
|
|
|
};
|
2023-09-17 14:06:53 -04:00
|
|
|
jellyfin = {
|
2023-10-03 15:48:48 -04:00
|
|
|
rule = "Host(`jellyfin.internal.flake.sh`)";
|
2024-01-31 09:41:17 -05:00
|
|
|
entrypoints = ["websecure"];
|
2023-09-17 14:06:53 -04:00
|
|
|
service = "jellyfin";
|
2024-01-31 09:41:17 -05:00
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
2023-09-17 14:06:53 -04:00
|
|
|
};
|
|
|
|
jellyseerr = {
|
2023-10-03 15:48:48 -04:00
|
|
|
rule = "Host(`jellyseerr.internal.flake.sh`)";
|
2024-01-31 09:41:17 -05:00
|
|
|
entrypoints = ["websecure"];
|
2023-09-17 14:06:53 -04:00
|
|
|
service = "jellyseerr";
|
2024-01-31 09:41:17 -05:00
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
2023-09-17 14:06:53 -04:00
|
|
|
};
|
2023-11-11 16:27:11 -05:00
|
|
|
wallos = {
|
|
|
|
rule = "Host(`wallos.internal.flake.sh`)";
|
2024-01-31 09:41:17 -05:00
|
|
|
entrypoints = ["websecure"];
|
2023-11-11 16:27:11 -05:00
|
|
|
service = "wallos";
|
2024-01-31 09:41:17 -05:00
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
2023-11-11 16:27:11 -05:00
|
|
|
};
|
2024-01-09 00:25:11 -05:00
|
|
|
searxng = {
|
|
|
|
rule = "Host(`search.internal.flake.sh`)";
|
2024-01-31 09:41:17 -05:00
|
|
|
entrypoints = ["websecure"];
|
2024-01-09 00:25:11 -05:00
|
|
|
service = "searxng";
|
2024-01-31 09:41:17 -05:00
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
2024-01-09 00:25:11 -05:00
|
|
|
};
|
2024-01-23 22:06:44 -05:00
|
|
|
hass = {
|
|
|
|
rule = "Host(`hass.internal.flake.sh`)";
|
2024-01-31 09:41:17 -05:00
|
|
|
entrypoints = ["websecure"];
|
2024-01-23 22:06:44 -05:00
|
|
|
service = "hass";
|
2024-01-31 09:41:17 -05:00
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
2024-01-23 22:06:44 -05:00
|
|
|
};
|
2024-01-30 19:28:30 -05:00
|
|
|
paperless = {
|
|
|
|
rule = "Host(`paperless.internal.flake.sh`)";
|
2024-01-31 09:41:17 -05:00
|
|
|
entrypoints = ["websecure"];
|
2024-01-30 19:28:30 -05:00
|
|
|
service = "paperless";
|
2024-01-31 09:41:17 -05:00
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
|
|
|
};
|
2024-02-01 07:39:28 -05:00
|
|
|
miniflux = {
|
|
|
|
rule = "Host(`rss.internal.flake.sh`)";
|
|
|
|
entrypoints = ["websecure"];
|
|
|
|
service = "miniflux";
|
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
|
|
|
};
|
2024-01-31 09:41:17 -05:00
|
|
|
# kariru
|
|
|
|
sonarr = {
|
|
|
|
rule = "Host(`sonarr.internal.flake.sh`)";
|
|
|
|
entryPoints = ["websecure"];
|
|
|
|
service = "sonarr";
|
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
|
|
|
};
|
|
|
|
radarr = {
|
|
|
|
rule = "Host(`radarr.internal.flake.sh`)";
|
|
|
|
entryPoints = ["websecure"];
|
|
|
|
service = "radarr";
|
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
|
|
|
};
|
|
|
|
readarr = {
|
|
|
|
rule = "Host(`readarr.internal.flake.sh`)";
|
|
|
|
entryPoints = ["websecure"];
|
|
|
|
service = "readarr";
|
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
|
|
|
};
|
|
|
|
lidarr = {
|
|
|
|
rule = "Host(`lidarr.internal.flake.sh`)";
|
|
|
|
entryPoints = ["websecure"];
|
|
|
|
service = "lidarr";
|
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
|
|
|
};
|
|
|
|
bazarr = {
|
|
|
|
rule = "Host(`bazarr.internal.flake.sh`)";
|
|
|
|
entryPoints = ["websecure"];
|
|
|
|
service = "bazarr";
|
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
|
|
|
};
|
|
|
|
whisparr = {
|
|
|
|
rule = "Host(`whisparr.internal.flake.sh`)";
|
|
|
|
entryPoints = ["websecure"];
|
|
|
|
service = "whisparr";
|
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
|
|
|
};
|
|
|
|
prowlarr = {
|
|
|
|
rule = "Host(`prowlarr.internal.flake.sh`)";
|
|
|
|
entrypoints = ["websecure"];
|
|
|
|
service = "prowlarr";
|
|
|
|
tls.domains = [{main = "*.internal.flake.sh";}];
|
|
|
|
tls.certresolver = "production";
|
2024-01-30 19:28:30 -05:00
|
|
|
};
|
2023-06-11 18:24:13 -04:00
|
|
|
};
|
|
|
|
services = {
|
2024-01-31 09:41:17 -05:00
|
|
|
# local
|
2023-06-13 12:11:08 -04:00
|
|
|
stash.loadBalancer.servers = [{url = "http://localhost:9999";}];
|
2023-11-11 16:27:11 -05:00
|
|
|
homepage.loadBalancer.servers = [{url = "http://localhost:7676";}];
|
2023-09-17 14:06:53 -04:00
|
|
|
jellyfin.loadBalancer.servers = [{url = "http://localhost:8096";}];
|
|
|
|
jellyseerr.loadBalancer.servers = [{url = "http://localhost:5055";}];
|
2023-11-11 16:27:11 -05:00
|
|
|
wallos.loadBalancer.servers = [{url = "http://localhost:8282";}];
|
2024-01-09 00:25:11 -05:00
|
|
|
searxng.loadBalancer.servers = [{url = "http://localhost:8100";}];
|
2024-01-23 22:06:44 -05:00
|
|
|
hass.loadBalancer.servers = [{url = "http://localhost:8123";}];
|
2024-01-31 09:41:17 -05:00
|
|
|
paperless.loadBalancer.servers = [{url = "http://localhost:28981";}];
|
2024-02-01 07:39:28 -05:00
|
|
|
miniflux.loadBalancer.servers = [{url = "http://localhost:9000";}];
|
2024-01-31 09:41:17 -05:00
|
|
|
# kariru
|
|
|
|
sonarr.loadBalancer.servers = [{url = "http://192.168.1.54:8989";}];
|
|
|
|
radarr.loadBalancer.servers = [{url = "http://192.168.1.54:7878";}];
|
|
|
|
readarr.loadBalancer.servers = [{url = "http://192.168.1.54:8787";}];
|
|
|
|
lidarr.loadBalancer.servers = [{url = "http://192.168.1.54:8686";}];
|
|
|
|
bazarr.loadBalancer.servers = [{url = "http://192.168.1.54:6767";}];
|
|
|
|
whisparr.loadBalancer.servers = [{url = "http://192.168.1.54:6969";}];
|
|
|
|
prowlarr.loadBalancer.servers = [{url = "http://192.168.1.54:9696";}];
|
2023-06-11 18:24:13 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
staticConfigOptions = {
|
|
|
|
log.level = "DEBUG";
|
2024-01-31 09:41:17 -05:00
|
|
|
api.dashboard = true;
|
|
|
|
api.insecure = true;
|
2023-06-11 18:24:13 -04:00
|
|
|
global = {
|
|
|
|
checkNewVersion = false;
|
|
|
|
sendAnonymousUsage = false;
|
|
|
|
};
|
|
|
|
entryPoints = {
|
2023-06-14 02:59:32 -04:00
|
|
|
websecure = {
|
|
|
|
address = ":443";
|
|
|
|
forwardedHeaders.insecure = true;
|
|
|
|
};
|
|
|
|
web = {
|
|
|
|
address = ":80";
|
|
|
|
forwardedHeaders.insecure = true;
|
|
|
|
};
|
2023-06-11 18:24:13 -04:00
|
|
|
};
|
2024-01-31 09:41:17 -05:00
|
|
|
certificatesResolvers = {
|
|
|
|
production.acme = {
|
|
|
|
email = "x3xr6n66@notohh.dev";
|
|
|
|
storage = "/var/lib/traefik/acme.json";
|
|
|
|
caServer = "https://acme-v02.api.letsencrypt.org/directory";
|
|
|
|
dnsChallenge = {
|
|
|
|
provider = "cloudflare";
|
|
|
|
resolvers = ["1.1.1.1:53" "1.0.0.1:53"];
|
|
|
|
delayBeforeCheck = "0";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-06-11 18:24:13 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|