25 lines
656 B
Nix
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}/";
|
|
};
|
|
};
|
|
};
|
|
}
|