Tangled infrastructure definitions in Nix

Compare changes

Choose any two refs to compare.

Changed files
+17 -10
hosts
appview
services
-10
flake.nix
··· 22 22 system = "x86_64-linux"; 23 23 commonArgs = import ./common/ssh.nix; 24 24 25 - colmenaHive = colmena.lib.makeHive { 26 - meta = { 27 - nixpkgs = nixpkgs.legacyPackages.x86_64-linux; 28 - specialArgs = { 29 - nixery-pkgs = import nixery-flake.outPath { 30 - pkgs = import nixpkgs { system = "x86_64-linux"; }; 31 - }; 32 - tangled-pkgs = tangled.packages.x86_64-linux; 33 - commonArgs = import ./common/ssh.nix; 34 - }; 35 25 # Helper function to create nixosConfiguration 36 26 mkHost = hostname: extraModules: 37 27 nixpkgs.lib.nixosSystem {
+17
hosts/appview/services/nginx.nix
··· 7 7 recommendedOptimisation = true; 8 8 recommendedGzipSettings = true; 9 9 10 + # bot blocking 11 + appendHttpConfig = '' 12 + map $http_user_agent $block_bot { 13 + default 0; 14 + ~*PerplexityBot 1; 15 + ~*GPTBot 1; 16 + ~*ChatGPT-User 1; 17 + ~*CCBot 1; 18 + ~*anthropic-ai 1; 19 + ~*Claude-Web 1; 20 + } 21 + ''; 22 + 10 23 streamConfig = '' 11 24 upstream knot-sailor { 12 25 server 94.237.110.185:22; ··· 56 69 enableACME = true; 57 70 58 71 extraConfig = '' 72 + if ($block_bot) { 73 + return 403; 74 + } 75 + 59 76 # Redirect www → bare domain 60 77 if ($host = www.tangled.org) { 61 78 return 301 https://tangled.org$request_uri;