summaryrefslogtreecommitdiff
path: root/adonis/tor/snowflake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'adonis/tor/snowflake.nix')
-rw-r--r--adonis/tor/snowflake.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/adonis/tor/snowflake.nix b/adonis/tor/snowflake.nix
new file mode 100644
index 0000000..5a1c4bb
--- /dev/null
+++ b/adonis/tor/snowflake.nix
@@ -0,0 +1,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;
+ '';
+ };
+}