From a747dbf8ec9d31a6cbe8e1de61d09ecc8b9d2bf0 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sun, 11 Aug 2024 20:07:28 +0530 Subject: [PATCH] rico0: add dns for local hosts --- hosts/rico0/services/apps/blocky.nix | 8 +++++++ hosts/rico0/services/default.nix | 36 ++++++++++++++++++++++++---- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/hosts/rico0/services/apps/blocky.nix b/hosts/rico0/services/apps/blocky.nix index e1f5c3c..675c700 100644 --- a/hosts/rico0/services/apps/blocky.nix +++ b/hosts/rico0/services/apps/blocky.nix @@ -50,6 +50,14 @@ _: { customTTL = "1h"; filterUnmappedTypes = true; mapping = { + "gateway.local.adtya.xyz" = "192.168.0.1"; + "ap1.local.adtya.xyz" = "192.168.1.1"; + "ap2.local.adtya.xyz" = "192.168.1.2"; + "switch.local.adtya.xyz" = "192.168.1.3"; + "gateway.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10"; + "ap1.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10"; + "ap2.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10"; + "switch.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10"; "proxy.labs.adtya.xyz" = "10.10.10.1,fd7c:585c:c4ae::1"; "skipper.labs.adtya.xyz" = "10.10.10.2,fd7c:585c:c4ae::2"; "rico0.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10"; diff --git a/hosts/rico0/services/default.nix b/hosts/rico0/services/default.nix index 1e324cd..ed6619f 100644 --- a/hosts/rico0/services/default.nix +++ b/hosts/rico0/services/default.nix @@ -8,11 +8,37 @@ _: { ]; services.caddy = { - virtualHosts."frp.labs.adtya.xyz" = { - extraConfig = '' - reverse_proxy 10.10.10.1:7500 - tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key - ''; + virtualHosts = { + "gateway.labs.adtya.xyz" = { + extraConfig = '' + reverse_proxy 192.168.0.1:80 + tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key + ''; + }; + "ap1.labs.adtya.xyz" = { + extraConfig = '' + reverse_proxy 192.168.1.1:80 + tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key + ''; + }; + "ap2.labs.adtya.xyz" = { + extraConfig = '' + reverse_proxy 192.168.1.2:80 + tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key + ''; + }; + "switch.labs.adtya.xyz" = { + extraConfig = '' + reverse_proxy 192.168.1.3:80 + tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key + ''; + }; + "frp.labs.adtya.xyz" = { + extraConfig = '' + reverse_proxy 10.10.10.1:7500 + tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key + ''; + }; }; }; }