From 080f4a8af2695603f32a0b095204d77aa554df7c Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 7 Nov 2022 19:02:27 -0800 Subject: feat(services/gitea): add robots.txt Configure the policy for the crawlers. --- modules/services/gitea/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/services/gitea/default.nix b/modules/services/gitea/default.nix index ece75de..ac4cff3 100644 --- a/modules/services/gitea/default.nix +++ b/modules/services/gitea/default.nix @@ -1,5 +1,10 @@ { config, pkgs, lib, ... }: -let cfg = config.my.services.gitea; +let + cfg = config.my.services.gitea; + robots-deny = pkgs.writeText "robots.txt" '' + User-agent: * + Disallow: / + ''; in { options.my.services.gitea = with lib; { @@ -49,6 +54,7 @@ in proxyPass = "http://127.0.0.1:8002"; proxyWebsockets = true; }; + locations."= /robots.txt".alias = robots-deny; }; services.prometheus.scrapeConfigs = [{ -- cgit 1.4.1