make the cache internal-only
This commit is contained in:
parent
78cfc13b2b
commit
3ea92074e8
1 changed files with 9 additions and 1 deletions
|
@ -1,4 +1,11 @@
|
|||
{ ... }: {
|
||||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
listenIPs = (import ../../utils/getInternalIP.nix config).listenIPs;
|
||||
listenStatements = lib.concatStringsSep "\n" (builtins.map (ip: "listen ${ip}:443 http3;") listenIPs) + ''
|
||||
add_header Alt-Svc 'h3=":443"';
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(import ../../modules/gateway-st.nix {
|
||||
name = "nix-cache";
|
||||
|
@ -6,6 +13,7 @@
|
|||
})
|
||||
];
|
||||
services.nginx.virtualHosts."cache.int.chir.rs" = {
|
||||
listenAddresses = listenIPs;
|
||||
sslCertificate = "/var/lib/acme/int.chir.rs/cert.pem";
|
||||
sslCertificateKey = "/var/lib/acme/int.chir.rs/key.pem";
|
||||
locations."/" = {
|
||||
|
|
Loading…
Reference in a new issue