summaryrefslogtreecommitdiff
path: root/adonis/tor/snowflake.nix
blob: 5a1c4bbd273b2333ecc754ca91cb12d8496dcb32 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{config, ...}: let
  torDomain = "tor.${config.customOps.domain.fqdn}";
in {
  services.snowflake-proxy = {
    enable = true;
    capacity = 20;
    extraFlags = ["-metrics"];
  };

  services.nginx.virtualHosts.${torDomain} = {
    root = "/var/www/${torDomain}";
    forceSSL = true;
    enableACME = true;
    locations."~ \\.php$".extraConfig = ''
      fastcgi_pass  unix:${config.services.phpfpm.pools.mypool.socket};
      fastcgi_index index.php;
    '';
  };
}