From 28168a7701c897a5b6af13bc472d6f5902e0a96d Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 25 Mar 2026 07:19:26 +0000 Subject: chore: remove arbitrary default max connections limit When NGIT_MAX_CONNECTIONS is unset the relay imposes no connection cap, deferring to OS fd limits and infrastructure controls. The option remains available for operators who want an explicit ceiling. --- nix/module.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'nix') diff --git a/nix/module.nix b/nix/module.nix index 7354ab6..9693358 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -268,9 +268,10 @@ let }; maxConnections = mkOption { - type = types.int; - default = 4096; - description = "Maximum total connections to the relay"; + type = types.nullOr types.int; + default = null; + description = + "Maximum total connections to the relay (default: unlimited, defers to OS/infrastructure limits)"; }; user = mkOption { @@ -337,8 +338,9 @@ let NGIT_REPOSITORY_WHITELIST = concatStringsSep "," cfg.repositoryWhitelist; NGIT_REPOSITORY_BLACKLIST = concatStringsSep "," cfg.repositoryBlacklist; NGIT_EVENT_BLACKLIST = concatStringsSep "," cfg.eventBlacklist; - NGIT_MAX_CONNECTIONS = toString cfg.maxConnections; NGIT_LOG_LEVEL = cfg.logLevel; + } // optionalAttrs (cfg.maxConnections != null) { + NGIT_MAX_CONNECTIONS = toString cfg.maxConnections; } // optionalAttrs (cfg.relayName != null) { NGIT_RELAY_NAME = cfg.relayName; } // optionalAttrs (cfg.archiveReadOnly != null) { -- cgit v1.2.3