From 84abaee8edd870ebf1e8e7a14daca1f8d37125b7 Mon Sep 17 00:00:00 2001 From: "Ricardo (XenGi) Band" Date: Sun, 27 Sep 2026 14:51:21 +0200 Subject: [PATCH] less scrapers --- README.md | 13 +++++++++---- hosts/git/forgejo.nix | 5 ++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8638831..28e4b42 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,16 @@ ### Update a container +Build and check for changes: + ```shell -ssh -cd /etc/nixos -nix run .#apps.nixos-diff # Show what changes would be applied -nixos-rebuild switch # Apply changes +nix run .#remote-diff-git +``` + +Build and apply: + +```shell +nix run .#remote-apply-git ``` ### Special things diff --git a/hosts/git/forgejo.nix b/hosts/git/forgejo.nix index f8ba6e3..a04410d 100644 --- a/hosts/git/forgejo.nix +++ b/hosts/git/forgejo.nix @@ -75,7 +75,8 @@ in nginx = { appendHttpConfig = '' - limit_req_zone $binary_remote_addr zone=forgejo_archive:10m rate=2r/s; + limit_req_zone $binary_remote_addr zone=forgejo_archive:10m rate=10r/m; + limit_conn_zone $binary_remote_addr zone=forgejo_archive_conn:10m; ''; virtualHosts."${fqdn}" = { quic = true; @@ -106,6 +107,8 @@ in }; "~ ^/[^/]+/[^/]+/archive/".extraConfig = '' limit_req zone=forgejo_archive burst=10 nodelay; + limit_conn forgejo_archive_conn 2; + limit_req_status 429; ''; "= /robots.txt".extraConfig = '' default_type text/plain;