0f1d3de26f
Having a slow cache is better than having no cache. Change-Id: Ie3cfcd4a2937d90b0e2ad899816bc31ae806631f Reviewed-on: https://cl.tvl.fyi/c/depot/+/2847 Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: sterni <sternenseemann@systemli.org>
26 lines
501 B
Nix
26 lines
501 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
imports = [
|
|
./base.nix
|
|
];
|
|
|
|
config = {
|
|
services.nginx.virtualHosts."cache.tvl.su" = {
|
|
serverName = "cache.tvl.su";
|
|
serverAliases = [ "cache.tvl.fyi" ];
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
|
|
extraConfig = ''
|
|
location = /cache-key.pub {
|
|
alias /etc/secrets/nix-cache-key.pub;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://localhost:${toString config.services.nix-serve.port};
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
}
|