Server/caddy: precompress the NixOS manual

This commit is contained in:
Toast 2025-01-03 18:56:00 +01:00
parent dca3d05aec
commit ebbbc8da58

View file

@ -1,6 +1,7 @@
{
config,
lib,
pkgs,
...
}: let
manualHostname = "manual.everest.tailscale";
@ -31,10 +32,14 @@ in {
virtualHosts = {
nixos-manual = {
hostName = manualHostname;
extraConfig = ''
extraConfig = let
manual = pkgs.compressDrvWeb config.system.build.manual.manualHTML {};
in ''
import tailscale
file_server
root * ${config.system.build.manual.manualHTML}/share/doc/nixos
file_server {
precompressed zstd br gzip
}
root * ${manual}/share/doc/nixos
'';
};
downloads = {