2024-01-23 09:44:06 +08:00
|
|
|
{ ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
virtualisation.oci-containers.containers = {
|
|
|
|
adguardhome = {
|
|
|
|
autoStart = true;
|
|
|
|
image = "adguard/adguardhome";
|
|
|
|
ports = [
|
|
|
|
"53:53" # Plain DNS
|
|
|
|
"3000:3000" # WEBGUI
|
|
|
|
];
|
|
|
|
volumes = [
|
|
|
|
"/srv/containers/adguardhome/work:/opt/adguardhome/work"
|
|
|
|
"/srv/containers/adguardhome/conf:/opt/adguardhome/conf"
|
|
|
|
];
|
|
|
|
extraOptions = [
|
|
|
|
"--network=host"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-06-05 21:14:22 +08:00
|
|
|
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 = [
|
2024-06-05 23:09:46 +08:00
|
|
|
{ url = "http://127.0.0.1:3000"; }
|
2024-06-05 21:14:22 +08:00
|
|
|
];
|
|
|
|
};
|
2024-01-23 09:44:06 +08:00
|
|
|
}
|
2024-06-05 21:14:22 +08:00
|
|
|
|