2021-04-04 20:24:34 +02:00
|
|
|
{ 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 {
|
2021-12-10 19:23:05 +01:00
|
|
|
alias /run/agenix/nix-cache-pub;
|
2021-04-04 20:24:34 +02:00
|
|
|
}
|
|
|
|
|
2022-01-07 01:47:18 +01:00
|
|
|
location = /nix-cache-info {
|
|
|
|
add_header Content-Type text/plain;
|
|
|
|
return 200 "StoreDir: /nix/store\nWantMassQuery: 1\nPriority: 50\n";
|
|
|
|
}
|
|
|
|
|
2021-04-04 20:24:34 +02:00
|
|
|
location / {
|
|
|
|
proxy_pass http://localhost:${toString config.services.nix-serve.port};
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|