portable-binary-cache/binary-cache/tvix-cache.nix
raito 5cc202ecca Initial binary cache
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-07-19 13:09:49 +02:00

25 lines
656 B
Nix

{ config, ... }: {
services.tvix-binary-cache = {
enable = true;
caches = {
forkos.port = 8000;
cno.port = 8001;
};
};
services.nginx = {
enable = true;
recommendedProxySettings = true;
clientMaxBodySize = "50G";
virtualHosts.cache = {
default = true;
locations = {
"/forkos".return = "302 /forkos/";
"/forkos/".proxyPass = "http://localhost:${toString config.services.tvix-binary-cache.caches.forkos.port}/";
"/cno".return = "302 /cno/";
"/cno/".proxyPass = "http://localhost:${toString config.services.tvix-binary-cache.caches.cno.port}/";
};
};
};
}