about summary refs log tree commit diff
path: root/users/sterni
diff options
context:
space:
mode:
Diffstat (limited to 'users/sterni')
-rw-r--r--users/sterni/machines/ingeborg/http/code.sterni.lv.nix8
1 files changed, 8 insertions, 0 deletions
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;