35 lines
627 B
Nix
35 lines
627 B
Nix
{ pkgs
|
|
, wiki
|
|
, ...
|
|
}:
|
|
let
|
|
system = pkgs.system;
|
|
in
|
|
{
|
|
services = {
|
|
caddy.virtualHosts = {
|
|
"wiki.adtya.xyz" = {
|
|
extraConfig = ''
|
|
root * ${wiki.packages.${system}.default}/share/web
|
|
encode gzip
|
|
try_files {path} /index.html
|
|
file_server
|
|
'';
|
|
};
|
|
};
|
|
|
|
frp.settings = {
|
|
"http.wiki.adtya.xyz" = {
|
|
type = "http";
|
|
custom_domains = "wiki.adtya.xyz";
|
|
local_port = 80;
|
|
};
|
|
|
|
"https.wiki.adtya.xyz" = {
|
|
type = "https";
|
|
custom_domains = "wiki.adtya.xyz";
|
|
local_port = 443;
|
|
};
|
|
};
|
|
};
|
|
}
|