2024-09-14 19:55:57 +05:30
|
|
|
{ inputs, pkgs, ... }:
|
|
|
|
let
|
|
|
|
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
|
|
|
|
domainName = "wiki.adtya.xyz";
|
|
|
|
in
|
|
|
|
{
|
2024-07-03 22:57:30 +05:30
|
|
|
services = {
|
2024-09-14 19:55:57 +05:30
|
|
|
caddy.virtualHosts."${domainName}" = {
|
2024-10-27 23:09:50 +05:30
|
|
|
inherit logFormat;
|
2024-07-03 22:57:30 +05:30
|
|
|
extraConfig = ''
|
|
|
|
handle {
|
|
|
|
root * ${inputs.wiki.packages.${pkgs.system}.default}/share/web
|
|
|
|
encode gzip
|
|
|
|
try_files {path} /index.html
|
|
|
|
file_server
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
frp.settings.proxies = [
|
|
|
|
{
|
2024-09-14 19:55:57 +05:30
|
|
|
name = "http.${domainName}";
|
2024-07-03 22:57:30 +05:30
|
|
|
type = "http";
|
2024-09-14 19:55:57 +05:30
|
|
|
customDomains = [ "${domainName}" ];
|
2024-07-03 22:57:30 +05:30
|
|
|
localPort = 80;
|
|
|
|
transport.useCompression = true;
|
|
|
|
}
|
|
|
|
{
|
2024-09-14 19:55:57 +05:30
|
|
|
name = "https.${domainName}";
|
2024-07-03 22:57:30 +05:30
|
|
|
type = "https";
|
2024-09-14 19:55:57 +05:30
|
|
|
customDomains = [ "${domainName}" ];
|
2024-07-03 22:57:30 +05:30
|
|
|
localPort = 443;
|
|
|
|
transport.useCompression = true;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|