From 4cd08447ae72ce7af7ce795094ea3f65586e061a Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Mon, 16 Sep 2024 08:34:40 +0700 Subject: [PATCH] caddy: added crowfx.web.id domain --- system/services/caddy.nix | 40 ++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/system/services/caddy.nix b/system/services/caddy.nix index 3e22981..577fab2 100644 --- a/system/services/caddy.nix +++ b/system/services/caddy.nix @@ -15,15 +15,7 @@ in } ''; - services.caddy.virtualHosts."router.tigor.web.id".extraConfig = '' - @denied not remote_ip private_ranges - - respond @denied "Access denied" 403 - - reverse_proxy 192.168.100.1 - ''; - - services.caddy.virtualHosts."tigor.web.id".extraConfig = + services.caddy.virtualHosts = let domains = attrsets.mapAttrsToList (name: _: strings.removePrefix "https://" name) config.services.caddy.virtualHosts; sortedDomains = lists.sort (a: b: a < b) domains; @@ -53,11 +45,29 @@ in ''; in - '' - header Content-Type text/html - respond <