30 lines
563 B
Nix
Executable File
30 lines
563 B
Nix
Executable File
{ lib, pkgs, ... }: {
|
|
services.caddy = {
|
|
enable = lib.mkDefault true;
|
|
virtualHosts."http://localhost:1989".extraConfig = ''
|
|
encode zstd gzip
|
|
root * ${pkgs.cinny}
|
|
|
|
|
|
file_server
|
|
@index {
|
|
not path /index.html
|
|
not path /public/*
|
|
not path /assets/*
|
|
|
|
not path /config.json
|
|
|
|
not path /manifest.json
|
|
not path /pdf.worker.min.js
|
|
not path /olm.wasm
|
|
not path /sw.js
|
|
|
|
path /*
|
|
}
|
|
|
|
rewrite /*/olm.wasm /olm.wasm
|
|
rewrite @index /index.html
|
|
'';
|
|
};
|
|
}
|