diff --git a/system/services/caddy.nix b/system/services/caddy.nix index 51fa728..1f6a910 100644 --- a/system/services/caddy.nix +++ b/system/services/caddy.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, unstable, ... }: let cfg = config.profile.services.caddy; inherit (lib) mkIf attrsets strings lists; @@ -7,6 +7,7 @@ in config = mkIf cfg.enable { services.caddy = { enable = true; + package = unstable.caddy; }; services.caddy.globalConfig = /*caddy*/ '' @@ -15,36 +16,44 @@ in } ''; + environment.etc."caddy/static/tigor.web.id/index.html" = { + text = + let + domains = attrsets.mapAttrsToList (name: _: strings.removePrefix "https://" name) config.services.caddy.virtualHosts; + sortedDomains = lists.sort (a: b: a < b) domains; + list = map + (domain: /*html*/ '' +