Server/caddy: precompress the NixOS manual
This commit is contained in:
parent
dca3d05aec
commit
ebbbc8da58
1 changed files with 8 additions and 3 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue