configuration.nix/hosts/rico1/services/apps/wiki.nix
2024-07-03 22:57:30 +05:30

30 lines
730 B
Nix

{ inputs, pkgs, ... }: {
services = {
caddy.virtualHosts."wiki.adtya.xyz" = {
extraConfig = ''
handle {
root * ${inputs.wiki.packages.${pkgs.system}.default}/share/web
encode gzip
try_files {path} /index.html
file_server
}
'';
};
frp.settings.proxies = [
{
name = "http.wiki.adtya.xyz";
type = "http";
customDomains = [ "wiki.adtya.xyz" ];
localPort = 80;
transport.useCompression = true;
}
{
name = "https.wiki.adtya.xyz";
type = "https";
customDomains = [ "wiki.adtya.xyz" ];
localPort = 443;
transport.useCompression = true;
}
];
};
}