configuration.nix/hosts/rico0/services/apps/wiki.nix
2024-10-27 23:56:51 +05:30

36 lines
854 B
Nix

{ inputs, pkgs, ... }:
let
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
domainName = "wiki.adtya.xyz";
in
{
services = {
caddy.virtualHosts."${domainName}" = {
inherit logFormat;
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.${domainName}";
type = "http";
customDomains = [ "${domainName}" ];
localPort = 80;
transport.useCompression = true;
}
{
name = "https.${domainName}";
type = "https";
customDomains = [ "${domainName}" ];
localPort = 443;
transport.useCompression = true;
}
];
};
}