From 402b5c67a8ce96709d31c40e000bfdd339b23409 Mon Sep 17 00:00:00 2001 From: emilylange Date: Tue, 24 Oct 2023 03:27:20 +0200 Subject: [PATCH] nixos/forgejo: pass {env}`GIT_PROTOCOL` via ssh to forgejo when using the host's openssh service (not the builtin golang one). This enables the use of the much faster and more efficient wire protocol version 2. See https://git-scm.com/docs/protocol-v2 --- nixos/modules/services/misc/forgejo.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/misc/forgejo.nix b/nixos/modules/services/misc/forgejo.nix index b2920981efbd..90b5f16f4189 100644 --- a/nixos/modules/services/misc/forgejo.nix +++ b/nixos/modules/services/misc/forgejo.nix @@ -632,6 +632,8 @@ in }; }; + services.openssh.settings.AcceptEnv = mkIf (!cfg.settings.START_SSH_SERVER or false) "GIT_PROTOCOL"; + users.users = mkIf (cfg.user == "forgejo") { forgejo = { home = cfg.stateDir;