a291c8690a
GitOrigin-RevId: e6e19f3d81a982a62e1bba08f0b4f7fdc21b4ea0
31 lines
669 B
Nix
31 lines
669 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 /run/agenix/nix-cache-pub;
|
|
}
|
|
|
|
location = /nix-cache-info {
|
|
add_header Content-Type text/plain;
|
|
return 200 "StoreDir: /nix/store\nWantMassQuery: 1\nPriority: 50\n";
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://localhost:${toString config.services.nix-serve.port};
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
}
|