From 0a6b38773874d32725f060fae36683d32a4c1cb6 Mon Sep 17 00:00:00 2001 From: sterni Date: Sun, 17 Nov 2024 17:20:37 +0100 Subject: chore(sterni/code.sterni.lv): deny indexing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All repositories under code.sterni.lv are mirrors, so there's no value in AI startups endlessly crawling the nixpkgs git history on code.sterni.lv… Change-Id: Iaac296315f325ced3cfd0852ae1d8d3f3815ea5b Reviewed-on: https://cl.tvl.fyi/c/depot/+/12803 Reviewed-by: sterni Autosubmit: sterni Tested-by: BuildkiteCI --- users/sterni/machines/ingeborg/http/code.sterni.lv.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'users') diff --git a/users/sterni/machines/ingeborg/http/code.sterni.lv.nix b/users/sterni/machines/ingeborg/http/code.sterni.lv.nix index aa42777d2312..40ff85b53e7b 100644 --- a/users/sterni/machines/ingeborg/http/code.sterni.lv.nix +++ b/users/sterni/machines/ingeborg/http/code.sterni.lv.nix @@ -118,6 +118,8 @@ let enable-blame=1 enable-commit-graph=1 + robots=noindex,nofollow + root-title=code.sterni.lv root-desc= css=/cgit.css @@ -191,6 +193,12 @@ in extraConfig = '' try_files $uri @cgit; + # Note this overrides the default robots.txt cgit-pink ships + location = /robots.txt { + add_header Content-Type text/plain; + return 200 "User-agent: *\nDisallow: /\n"; + } + location @cgit { include ${pkgs.nginx}/conf/fastcgi_params; fastcgi_param SCRIPT_FILENAME ${pkgs.cgit-pink}/cgit/cgit.cgi; -- cgit 1.4.1