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 <