From aea3bbaec4f480d9415ce509fb65a99211b2a674 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sat, 28 Oct 2023 05:13:11 +0530 Subject: [PATCH] add wiki --- hosts/rico2/services/wiki.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 hosts/rico2/services/wiki.nix diff --git a/hosts/rico2/services/wiki.nix b/hosts/rico2/services/wiki.nix new file mode 100644 index 0000000..1d32f2d --- /dev/null +++ b/hosts/rico2/services/wiki.nix @@ -0,0 +1,32 @@ +{ + config, + wiki, + ... +}: { + services = { + caddy.virtualHosts = { + "wiki.adtya.xyz" = { + extraConfig = '' + root * ${wiki.packages.${config.nixpkgs.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; + }; + }; + }; +}