Arion: Fix pihole dns for all docker containers

i previously had to fall back to cloudflare dns which didn't have all custom dns entries from pihole
This commit is contained in:
GHOSCHT 2024-05-03 21:01:25 +02:00
parent a6d9f57d8e
commit 108baeae60
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82
12 changed files with 14 additions and 31 deletions

View file

@ -39,7 +39,6 @@ in {
env_file = [ env_file = [
"/home/ghoscht/.docker/auth/authentik.env" "/home/ghoscht/.docker/auth/authentik.env"
]; ];
dns = ["1.1.1.1"];
restart = "always"; restart = "always";
depends_on = { depends_on = {
redis = {condition = "service_healthy";}; redis = {condition = "service_healthy";};
@ -65,7 +64,6 @@ in {
env_file = [ env_file = [
"/home/ghoscht/.docker/auth/authentik.env" "/home/ghoscht/.docker/auth/authentik.env"
]; ];
dns = ["1.1.1.1"];
depends_on = { depends_on = {
redis = {condition = "service_healthy";}; redis = {condition = "service_healthy";};
postgres = {condition = "service_healthy";}; postgres = {condition = "service_healthy";};

View file

@ -17,7 +17,6 @@
"traefik.http.routers.homarr.tls" = "true"; "traefik.http.routers.homarr.tls" = "true";
"traefik.http.routers.homarr.tls.certresolver" = "letsencrypt"; "traefik.http.routers.homarr.tls.certresolver" = "letsencrypt";
}; };
dns = ["1.1.1.1"];
environment = { environment = {
AUTH_PROVIDER = "oidc"; AUTH_PROVIDER = "oidc";
AUTH_OIDC_URI = "https://auth.ghoscht.com/application/o/homarr"; AUTH_OIDC_URI = "https://auth.ghoscht.com/application/o/homarr";

View file

@ -49,9 +49,6 @@
ipv4_address = "172.28.1.6"; ipv4_address = "172.28.1.6";
}; };
}; };
dns = [
"1.1.1.1"
];
capabilities = { capabilities = {
NET_ADMIN = true; NET_ADMIN = true;
}; };
@ -74,9 +71,6 @@
ipv4_address = "172.28.1.5"; ipv4_address = "172.28.1.5";
}; };
}; };
dns = [
"1.1.1.1"
];
}; };
}; };
} }

View file

@ -1,7 +1,14 @@
{ {pkgs, ...}: {
virtualisation.arion = { virtualisation.arion = {
projects.dns.settings = { projects.dns.settings = {
imports = [./arion-compose.nix]; imports = [./arion-compose.nix];
}; };
}; };
# Fix containers not being able to use pihole as dns
networking.resolvconf.useLocalResolver = true;
networking.firewall = {
enable = true;
allowedTCPPorts = [80 443];
};
} }

View file

@ -24,7 +24,6 @@
"/home/ghoscht/.docker/feed/ttrss.env" "/home/ghoscht/.docker/feed/ttrss.env"
]; ];
restart = "always"; restart = "always";
dns = ["1.1.1.1"];
networks = [ networks = [
"dmz" "dmz"
"transport" "transport"

View file

@ -29,7 +29,6 @@
ports = [ ports = [
"2222:22" "2222:22"
]; ];
dns = ["1.1.1.1"];
environment = { environment = {
USER_UID = 1000; USER_UID = 1000;
USER_GID = 1000; USER_GID = 1000;

View file

@ -14,7 +14,6 @@
command = "headscale serve"; command = "headscale serve";
labels = { labels = {
"traefik.enable" = "true"; "traefik.enable" = "true";
"traefik.http.services.headscale.loadbalancer.server.port" = "8080"; "traefik.http.services.headscale.loadbalancer.server.port" = "8080";
"traefik.http.routers.headscale.service" = "headscale"; "traefik.http.routers.headscale.service" = "headscale";
"traefik.http.routers.headscale.entrypoints" = "websecure-external"; "traefik.http.routers.headscale.entrypoints" = "websecure-external";
@ -22,12 +21,12 @@
"traefik.http.routers.headscale.tls" = "true"; "traefik.http.routers.headscale.tls" = "true";
"traefik.http.routers.headscale.tls.certresolver" = "letsencrypt"; "traefik.http.routers.headscale.tls.certresolver" = "letsencrypt";
# "traefik.http.services.headscale-external.loadbalancer.server.port" = "8080"; "traefik.http.services.headscale-external.loadbalancer.server.port" = "8080";
# "traefik.http.routers.headscale-external.service" = "headscale-external"; "traefik.http.routers.headscale-external.service" = "headscale-external";
# "traefik.http.routers.headscale-external.rule" = "Host(`headscale.ghoscht.com`)"; "traefik.http.routers.headscale-external.rule" = "Host(`headscale.ghoscht.com`)";
# "traefik.http.routers.headscale-external.entrypoints" = "websecure"; "traefik.http.routers.headscale-external.entrypoints" = "websecure";
# "traefik.http.routers.headscale-external.tls" = "true"; "traefik.http.routers.headscale-external.tls" = "true";
# "traefik.http.routers.headscale-external.tls.certresolver" = "letsencrypt"; "traefik.http.routers.headscale-external.tls.certresolver" = "letsencrypt";
}; };
volumes = [ volumes = [
"/storage/dataset/docker/headscale/headscale_config:/etc/headscale" "/storage/dataset/docker/headscale/headscale_config:/etc/headscale"

View file

@ -40,7 +40,6 @@
env_file = [ env_file = [
"/home/ghoscht/.docker/infrastructure/traefik.env" "/home/ghoscht/.docker/infrastructure/traefik.env"
]; ];
dns = ["1.1.1.1"];
restart = "always"; restart = "always";
networks = [ networks = [
"dmz" "dmz"
@ -53,7 +52,6 @@
"/home/ghoscht/.docker/infrastructure/cloudflared.env" "/home/ghoscht/.docker/infrastructure/cloudflared.env"
]; ];
restart = "always"; restart = "always";
dns = ["1.1.1.1"];
command = "tunnel --no-autoupdate --protocol http2 run"; command = "tunnel --no-autoupdate --protocol http2 run";
networks = [ networks = [
"dmz" "dmz"
@ -98,7 +96,6 @@
container_name = "dyndns"; container_name = "dyndns";
restart = "always"; restart = "always";
ports = ["8888:8080"]; ports = ["8888:8080"];
dns = ["1.1.1.1"];
environment = { environment = {
CLOUDFLARE_ZONES_IPV4 = "ghoscht.com"; CLOUDFLARE_ZONES_IPV4 = "ghoscht.com";
}; };

View file

@ -31,7 +31,6 @@
GID = "1000"; GID = "1000";
TZ = "Europe/Berlin"; TZ = "Europe/Berlin";
}; };
dns = ["1.1.1.2" "1.0.0.2" "176.103.130.130" "176.103.130.131" "9.9.9.9" "149.112.112.112" "208.67.222.222" "208.67.220.220"];
restart = "unless-stopped"; restart = "unless-stopped";
networks = [ networks = [
"dmz" "dmz"

View file

@ -33,7 +33,6 @@
PGID = 1000; PGID = 1000;
TZ = "Europe/Berlin"; TZ = "Europe/Berlin";
}; };
dns = ["1.1.1.1"];
restart = "always"; restart = "always";
networks = [ networks = [
"dmz" "dmz"
@ -60,7 +59,6 @@
env_file = [ env_file = [
"/home/ghoscht/.docker/media/navidrome.env" "/home/ghoscht/.docker/media/navidrome.env"
]; ];
dns = ["1.1.1.1"];
restart = "always"; restart = "always";
networks = [ networks = [
"dmz" "dmz"
@ -81,7 +79,6 @@
"/storage/dataset/docker/media/kavita_data:/kavita/config" "/storage/dataset/docker/media/kavita_data:/kavita/config"
"/storage/dataset/data/media/manga:/manga" "/storage/dataset/data/media/manga:/manga"
]; ];
dns = ["1.1.1.1"];
restart = "always"; restart = "always";
networks = [ networks = [
"dmz" "dmz"
@ -124,7 +121,6 @@
capabilities = { capabilities = {
NET_ADMIN = true; NET_ADMIN = true;
}; };
dns = ["1.1.1.1"];
restart = "always"; restart = "always";
networks = [ networks = [
"dmz" "dmz"
@ -259,7 +255,6 @@
"/storage/dataset/docker/media/bazarr_data:/config" "/storage/dataset/docker/media/bazarr_data:/config"
"/storage/dataset/data/:/data" "/storage/dataset/data/:/data"
]; ];
dns = ["1.1.1.1"];
environment = { environment = {
PUID = 1000; PUID = 1000;
PGID = 1000; PGID = 1000;
@ -288,7 +283,6 @@
PGID = 1000; PGID = 1000;
TZ = "Europe/Berlin"; TZ = "Europe/Berlin";
}; };
dns = ["1.1.1.1"];
networks = ["dmz"]; networks = ["dmz"];
restart = "always"; restart = "always";
}; };

View file

@ -29,7 +29,6 @@
REDIS_HOST = "nextcloud-redis"; REDIS_HOST = "nextcloud-redis";
REDIS_PORT = 6379; REDIS_PORT = 6379;
}; };
dns = ["1.1.1.1"];
restart = "unless-stopped"; restart = "unless-stopped";
networks = [ networks = [
"dmz" "dmz"

View file

@ -17,7 +17,6 @@
"traefik.http.routers.vaultwarden.tls" = "true"; "traefik.http.routers.vaultwarden.tls" = "true";
"traefik.http.routers.vaultwarden.tls.certresolver" = "letsencrypt"; "traefik.http.routers.vaultwarden.tls.certresolver" = "letsencrypt";
}; };
dns = ["1.1.1.1"];
volumes = [ volumes = [
"/storage/dataset/docker/passwords/vaultwarden_data/:/data" "/storage/dataset/docker/passwords/vaultwarden_data/:/data"
]; ];