Move traefik routers/services to applicable service/container.nix

This commit is contained in:
♥ Minnie ♥ 2024-06-05 21:14:22 +08:00
parent 54004d97cd
commit d660bf8101
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
15 changed files with 255 additions and 185 deletions

View file

@ -18,4 +18,23 @@
]; ];
}; };
}; };
services.traefik.dynamicConfigOptions.http.routers = {
adguard-home = {
rule = "Host(`adguard.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "adguard-home";
};
};
services.traefik.dynamicConfigOptions.http.services = {
adguard-home.loadBalancer.servers = [
{ url = "http://192.168.1.102:3000"; }
];
};
} }

View file

@ -21,4 +21,24 @@
]; ];
}; };
}; };
services.traefik.dynamicConfigOptions.http.routers = {
homarr = {
rule = "Host(`kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "homarr";
};
};
services.traefik.dynamicConfigOptions.http.services = {
homarr.loadBalancer.servers = [
{ url = "http://192.168.1.102:7575"; }
];
};
} }

View file

@ -26,4 +26,24 @@
]; ];
}; };
}; };
services.traefik.dynamicConfigOptions.http.routers = {
jellyfin = {
rule = "Host(`jellyfin.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"internal"
];
service = "jellyfin";
};
};
services.traefik.dynamicConfigOptions.http.services = {
jellyfin.loadBalancer.servers = [
{ url = "http://192.168.1.102:8096"; }
];
};
} }

View file

@ -17,4 +17,24 @@
]; ];
}; };
}; };
services.traefik.dynamicConfigOptions.http.routers = {
jellyseerr = {
rule = "Host(`jellyseerr.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"internal"
];
service = "jellyseerr";
};
};
services.traefik.dynamicConfigOptions.http.services = {
jellyseerr.loadBalancer.servers = [
{ url = "http://192.168.1.102:5055"; }
];
};
} }

View file

@ -20,4 +20,24 @@
]; ];
}; };
}; };
services.traefik.dynamicConfigOptions.http.routers = {
lidarr = {
rule = "Host(`lidarr.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "lidarr";
};
};
services.traefik.dynamicConfigOptions.http.services = {
lidarr.loadBalancer.servers = [
{ url = "http://192.168.1.102:8686"; }
];
};
} }

View file

@ -25,4 +25,24 @@
]; ];
}; };
}; };
services.traefik.dynamicConfigOptions.http.routers = {
microbin = {
rule = "Host(`bin.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"internal"
];
service = "microbin";
};
};
services.traefik.dynamicConfigOptions.http.services = {
microbin.loadBalancer.servers = [
{ url = "http://192.168.1.102:8181"; }
];
};
} }

View file

@ -18,4 +18,23 @@
]; ];
}; };
}; };
services.traefik.dynamicConfigOptions.http.routers = {
prowlarr = {
rule = "Host(`prowlarr.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "prowlarr";
};
};
services.traefik.dynamicConfigOptions.http.services = {
prowlarr.loadBalancer.servers = [
{ url = "http://192.168.1.102:9696"; }
];
};
} }

View file

@ -20,4 +20,24 @@
]; ];
}; };
}; };
services.traefik.dynamicConfigOptions.http.routers = {
qbittorrent = {
rule = "Host(`torrent.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "qbittorrent";
};
};
services.traefik.dynamicConfigOptions.http.services = {
qbittorrent.loadBalancer.servers = [
{ url = "http://192.168.1.102:8080"; }
];
};
} }

View file

@ -20,4 +20,23 @@
]; ];
}; };
}; };
services.traefik.dynamicConfigOptions.http.routers = {
radarr = {
rule = "Host(`radarr.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "radarr";
};
};
services.traefik.dynamicConfigOptions.http.services = {
radarr.loadBalancer.servers = [
{ url = "http://192.168.1.102:7878"; }
];
};
} }

View file

@ -20,5 +20,24 @@
]; ];
}; };
}; };
services.traefik.dynamicConfigOptions.http.routers = {
sonarr = {
rule = "Host(`sonarr.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "sonarr";
};
};
services.traefik.dynamicConfigOptions.http.services = {
sonarr.loadBalancer.servers = [
{ url = "http://192.168.1.102:8989"; }
];
};
} }

View file

@ -17,4 +17,24 @@
log.LEVEL = "Info"; log.LEVEL = "Info";
}; };
}; };
services.traefik.dynamicConfigOptions.http.routers = {
forgejo = {
rule = "Host(`git.sajenim.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"geoblock"
];
service = "forgejo";
};
};
services.traefik.dynamicConfigOptions.http.services = {
forgejo.loadBalancer.servers = [
{ url = "http://192.168.1.102:3131"; }
];
};
} }

View file

@ -12,5 +12,24 @@
adminAddr = "its.jassy@pm.me"; adminAddr = "its.jassy@pm.me";
}; };
}; };
services.traefik.dynamicConfigOptions.http.routers = {
httpd = {
rule = "Host(`sajenim.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"geoblock"
];
service = "httpd";
};
};
services.traefik.dynamicConfigOptions.http.services = {
httpd.loadBalancer.servers = [
{ url = "http://192.168.1.102:5624"; }
];
};
} }

View file

@ -74,4 +74,24 @@ in
# https://account.mojang.com/documents/minecraft_eula # https://account.mojang.com/documents/minecraft_eula
eula = true; eula = true;
}; };
services.traefik.dynamicConfigOptions.http.routers = {
minecraft = {
rule = "Host(`minecraft.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"internal"
];
service = "minecraft";
};
};
services.traefik.dynamicConfigOptions.http.services = {
minecraft.loadBalancer.servers = [
{ url = "http://192.168.1.102:25565"; }
];
};
} }

View file

@ -2,39 +2,6 @@
{ {
services.traefik.dynamicConfigOptions.http.routers = { services.traefik.dynamicConfigOptions.http.routers = {
httpd = {
rule = "Host(`sajenim.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"geoblock"
];
service = "httpd";
};
forgejo = {
rule = "Host(`git.sajenim.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"geoblock"
];
service = "forgejo";
};
homarr = {
rule = "Host(`kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "homarr";
};
traefik-dashboard = { traefik-dashboard = {
rule = "Host(`traefik.kanto.dev`)"; rule = "Host(`traefik.kanto.dev`)";
entryPoints = [ entryPoints = [
@ -46,116 +13,6 @@
service = "api@internal"; service = "api@internal";
}; };
adguard-home = {
rule = "Host(`adguard.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "adguard-home";
};
minecraft = {
rule = "Host(`minecraft.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"internal"
];
service = "minecraft";
};
jellyfin = {
rule = "Host(`jellyfin.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"internal"
];
service = "jellyfin";
};
sonarr = {
rule = "Host(`sonarr.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "sonarr";
};
radarr = {
rule = "Host(`radarr.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "radarr";
};
lidarr = {
rule = "Host(`lidarr.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "lidarr";
};
prowlarr = {
rule = "Host(`prowlarr.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "prowlarr";
};
qbittorrent = {
rule = "Host(`torrent.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "qbittorrent";
};
jellyseerr = {
rule = "Host(`jellyseerr.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"internal"
];
service = "jellyseerr";
};
microbin = {
rule = "Host(`bin.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"internal"
];
service = "microbin";
};
ender1 = { ender1 = {
rule = "Host(`e1.kanto.dev`)"; rule = "Host(`e1.kanto.dev`)";
entryPoints = [ entryPoints = [

View file

@ -2,48 +2,6 @@
{ {
services.traefik.dynamicConfigOptions.http.services = { services.traefik.dynamicConfigOptions.http.services = {
# sajenim.dev
httpd.loadBalancer.servers = [
{ url = "http://192.168.1.102:5624"; }
];
forgejo.loadBalancer.servers = [
{ url = "http://192.168.1.102:3131"; }
];
# kanto.dev
homarr.loadBalancer.servers = [
{ url = "http://192.168.1.102:7575"; }
];
adguard-home.loadBalancer.servers = [
{ url = "http://192.168.1.102:3000"; }
];
minecraft.loadBalancer.servers = [
{ url = "http://192.168.1.102:25565"; }
];
jellyfin.loadBalancer.servers = [
{ url = "http://192.168.1.102:8096"; }
];
sonarr.loadBalancer.servers = [
{ url = "http://192.168.1.102:8989"; }
];
radarr.loadBalancer.servers = [
{ url = "http://192.168.1.102:7878"; }
];
lidarr.loadBalancer.servers = [
{ url = "http://192.168.1.102:8686"; }
];
prowlarr.loadBalancer.servers = [
{ url = "http://192.168.1.102:9696"; }
];
qbittorrent.loadBalancer.servers = [
{ url = "http://192.168.1.102:8080"; }
];
jellyseerr.loadBalancer.servers = [
{ url = "http://192.168.1.102:5055"; }
];
microbin.loadBalancer.servers = [
{ url = "http://192.168.1.102:8181"; }
];
ender1.loadBalancer.servers = [ ender1.loadBalancer.servers = [
{ url = "http://192.168.1.103:80"; } { url = "http://192.168.1.103:80"; }
]; ];