diff options
Diffstat (limited to 'modules/services')
-rw-r--r-- | modules/services/cgit/default.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/services/cgit/default.nix b/modules/services/cgit/default.nix index b4e82ab..39e1633 100644 --- a/modules/services/cgit/default.nix +++ b/modules/services/cgit/default.nix @@ -1,6 +1,11 @@ { config, pkgs, lib, ... }: let cfg = config.my.services.cgit; + # there's no need for web crawlers on that site + robots-deny = pkgs.writeText "robots.txt" '' + User-agent: * + Disallow: / + ''; cgitrc = '' # Global configuration virtual-root=/ @@ -104,6 +109,7 @@ in enableACME = true; locations = { "~* ^.+.(css|png|ico)$" = { root = "${pkgs.cgit}/cgit"; }; + "/robots.txt".alias = robots-deny; "/".extraConfig = '' include ${pkgs.nginx}/conf/fastcgi_params; fastcgi_param CGIT_CONFIG ${pkgs.writeText "cgitrc" cgitrc}; |