diff --git a/hosts/rico2/services/caddy.nix b/hosts/rico2/services/caddy.nix index 31ee96d..6520d53 100644 --- a/hosts/rico2/services/caddy.nix +++ b/hosts/rico2/services/caddy.nix @@ -1,12 +1,27 @@ -{secrets, ...}: { +{ + secrets, + if3, + ... +}: { services.caddy = { enable = true; inherit (secrets.caddy_config) email; - virtualHosts."proofs.adtya.xyz" = { - extraConfig = '' - redir https://keyoxide.org/hkp/${secrets.users.primary.pgpFingerprint} - ''; + virtualHosts = { + "proofs.adtya.xyz" = { + extraConfig = '' + redir https://keyoxide.org/hkp/${secrets.users.primary.pgpFingerprint} + ''; + }; + + "if3.adtya.xyz" = { + extraConfig = '' + root * ${if3.packages.web}/share/web + encode gzip + try_files {path} /index.html + file_server + ''; + }; }; }; } diff --git a/hosts/rico2/services/frpc.nix b/hosts/rico2/services/frpc.nix index b4c5aca..c4c019e 100644 --- a/hosts/rico2/services/frpc.nix +++ b/hosts/rico2/services/frpc.nix @@ -57,6 +57,18 @@ in { custom_domains = "proofs.adtya.xyz"; local_port = 443; }; + + "http.if3.adtya.xyz" = { + type = "http"; + custom_domains = "if3.adtya.xyz"; + local_port = 80; + }; + + "https.if3.adtya.xyz" = { + type = "https"; + custom_domains = "if3.adtya.xyz"; + local_port = 443; + }; }; }; }