diff options
author | Franck Cuny <franck@fcuny.net> | 2022-11-07 19:02:27 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-11-07 19:02:27 -0800 |
commit | 080f4a8af2695603f32a0b095204d77aa554df7c (patch) | |
tree | d538a57154dea6d0ac59e9e8f6a044fffd874fe5 /modules/services | |
parent | ref(services/unifi): reduce the poller's verbosity (diff) | |
download | world-080f4a8af2695603f32a0b095204d77aa554df7c.tar.gz |
feat(services/gitea): add robots.txt
Configure the policy for the crawlers.
Diffstat (limited to 'modules/services')
-rw-r--r-- | modules/services/gitea/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
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 = [{ |