diff options
author | stuebinm | 2025-03-30 20:28:24 +0200 |
---|---|---|
committer | stuebinm | 2025-03-30 20:28:24 +0200 |
commit | b6a2f97aa765121ddf61a39fa4b67225db08c18e (patch) | |
tree | cea3f426e7f752915bc451faf972006ce3730317 | |
parent | efc9f5873fb0503f920e7863ed325f8087114523 (diff) |
add ai.robots.txt
maybe this'll lead to a little fewer traffic on the cgit?
-rw-r--r-- | flora/services/nginx.nix | 12 | ||||
-rw-r--r-- | npins/sources.json | 12 |
2 files changed, 23 insertions, 1 deletions
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 = { diff --git a/npins/sources.json b/npins/sources.json index e11752d..49b5d00 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1,5 +1,17 @@ { "pins": { + "ai.robots.txt": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "ai-robots-txt", + "repo": "ai.robots.txt" + }, + "branch": "main", + "revision": "5b8650b99b35ff2aa1aa9ae26183b312edc48d45", + "url": "https://github.com/ai-robots-txt/ai.robots.txt/archive/5b8650b99b35ff2aa1aa9ae26183b312edc48d45.tar.gz", + "hash": "1259mjps1f8nkcjzgcvin8d7firbn5q96k1mmcdhv67s6w4ilqfy" + }, "almanac": { "type": "Git", "repository": { |