From c7e9ff3c853755cd3b0e8bc7443d55d222a06f80 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Sun, 11 Jan 2026 08:03:03 -0600 Subject: clean up services/networking config even more --- modules/services/nixos/selfhost/adguard.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'modules/services/nixos/selfhost/adguard.nix') diff --git a/modules/services/nixos/selfhost/adguard.nix b/modules/services/nixos/selfhost/adguard.nix index 73c6caf..69fb8a4 100644 --- a/modules/services/nixos/selfhost/adguard.nix +++ b/modules/services/nixos/selfhost/adguard.nix @@ -32,17 +32,16 @@ in DNSStubListener=no ''; - services.caddy = lib.mkIf (config.collinux.services.selfhost.caddy.enable - && config.collinux.services.selfhost.magic_caddy.enable) { + services.tailscale.extraSetFlags = lib.optional config.collinux.services.networking.tailscale.enable "--accept-dns=false"; # would create an infinite loop of dns lookups + + services.caddy = lib.mkIf cfg.caddy.enable { virtualHosts.${cfg.root_url}.extraConfig = '' ${ - if config.collinux.services.networking.tailscale.enable - then "bind tailscale/adguard" + if cfg.caddy.bind_tailscale + then "bind tailscale/${cfg.service_name}" else "" } - reverse_proxy localhost:${toString cfg.port} + reverse_proxy ${cfg.bind_host}:${toString cfg.port} ''; }; - - services.tailscale.extraSetFlags = lib.optional config.collinux.services.networking.tailscale.enable "--accept-dns=false"; # would create an infinite loop of dns lookups } -- cgit v1.3.1