From b6a2f97aa765121ddf61a39fa4b67225db08c18e Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 30 Mar 2025 20:28:24 +0200 Subject: add ai.robots.txt maybe this'll lead to a little fewer traffic on the cgit? --- flora/services/nginx.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'flora/services') diff --git a/flora/services/nginx.nix b/flora/services/nginx.nix index 4a9bf33..c5aa45b 100644 --- a/flora/services/nginx.nix +++ b/flora/services/nginx.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, inputs, ... }: { networking.firewall.allowedTCPPorts = [ 80 443 ]; @@ -14,11 +14,17 @@ enableACME = true; forceSSL = true; locations."/".root = ../../pkgs/nomsing; + extraConfig = '' + include ${inputs."ai.robots.txt"}/nginx-block-ai-bots.conf; + ''; }; virtualHosts."meow.noms.ing" = { enableACME = true; forceSSL = true; locations."/".root = ../../pkgs/nomsing; + extraConfig = '' + include ${inputs."ai.robots.txt"}/nginx-block-ai-bots.conf; + ''; }; virtualHosts."webring.noms.ing" = { enableACME = true; @@ -29,7 +35,11 @@ fastcgi_param SCRIPT_FILENAME ${lib.getExe pkgs.nomsring}; fastcgi_param PATH_INFO $1; ''; + extraConfig = '' + include ${inputs."ai.robots.txt"}/nginx-block-ai-bots.conf; + ''; }; + }; services.fcgiwrap.instances.nomsing = { -- cgit v1.2.3