my nixos config
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

make ai scraper bots fuck off

chfour 5dcc40d7 aba2fe00

+17 -12
+17 -12
machines/fovps/services/caddy/default.nix
··· 8 8 services.caddy.extraConfig = '' 9 9 (errors) { 10 10 handle_errors { 11 - @custom_err file /{err.status_code}.html /err.html 12 - handle @custom_err { 13 - rewrite * {file_match.relative} 14 - file_server 15 - } 16 - respond "{err.status_code} {err.status_text} 11 + @custom_err file /{err.status_code}.html /err.html 12 + handle @custom_err { 13 + rewrite * {file_match.relative} 14 + file_server 15 + } 16 + respond "{err.status_code} {err.status_text} 17 17 " # caddy why 18 18 } 19 19 } 20 + (bots) { 21 + # https://donotsta.re/objects/4ff43b3e-2a56-48f1-870b-48353cd90801 22 + # > DON’T LET YOUR DREAMS STAY DREAMS! 23 + @bots header_regexp User-Agent "GPTBot|ChatGPT-User|Google-Extended|CCBot|PerplexityBot|anthropic-ai|Claude-Web|ClaudeBot|Amazonbot|FacebookBot|Applebot-Extended|semrush|barkrowler|PetalBot|meta-externalagent|meta-externalfetcher|facebookexternalhit|facebookcatalog|Firefox/72\.0|babbar\.tech|BLEXBot|DotBot|ahrefs|DataForSeoBot|ImagesiftBot|Nexus 5X Build/MMB29P|Arc/|MJ12Bot|dataforseo-bot|MJ12bot" 24 + handle @bots { 25 + header X-Fuck-Off "PLEASE do!" 26 + redir https://nbg1-speed.hetzner.com/10GB.bin?BALLS permanent 27 + } 28 + } 20 29 ''; 21 30 services.caddy.virtualHosts = { 22 31 "eeep.ee".extraConfig = '' 23 32 import errors 24 - 25 - # lol 26 - redir /nixos /nixos/ permanent 27 - handle_path /nixos/* { 28 - redir * https://github.com/chfour/nixos/tree/main{uri} 29 - } 33 + import bots 30 34 31 35 root * ${websiteDest} 32 36 encode zstd gzip ··· 35 39 36 40 "files.eeep.ee".extraConfig = '' 37 41 import errors 42 + import bots 38 43 39 44 root * /srv/pub 40 45 encode zstd gzip