about summary refs log tree commit diff
path: root/ops/modules/www/cache.tvl.su.nix
blob: 27d1c06dd3a78c76dc6f837e363504e7d1d4730f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ 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 / {
          proxy_pass http://${config.services.depot.harmonia.settings.bind};
        }
      '';
    };
  };
}