From 9ba330ab1a2bcf3ab26b1aeb7a189c44fa64d393 Mon Sep 17 00:00:00 2001 From: Silas Schöffel Date: Thu, 20 Jun 2024 10:27:20 +0200 Subject: feat(git-server): enable http-push --- modules/nixos/vhack/git-server.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/nixos/vhack/git-server.nix b/modules/nixos/vhack/git-server.nix index bcc049a..9e21b5c 100644 --- a/modules/nixos/vhack/git-server.nix +++ b/modules/nixos/vhack/git-server.nix @@ -34,6 +34,14 @@ in { nginx.virtualHosts."git.vhack.eu" = { enableACME = true; forceSSL = true; + locations."~ \"^/[0-9A-Za-z._-]+/(HEAD|info/refs|objects/info/(alternates|http-alternates|packs)|[0-9a-f]{2}/([0-9a-f]{38}|[0-9a-f]{62})|pack/pack-([0-9a-f]{40}|[0-9a-f]{64})\\.(pack|idx)|git-upload-pack|git-receive-pack)$\"".extraConfig = '' + include ${pkgs.nginx}/conf/fastcgi_params; + fastcgi_param GIT_HTTP_EXPORT_ALL ""; + fastcgi_param GIT_PROJECT_ROOT ${cfg.dataDir}; + fastcgi_param PATH_INFO $fastcgi_script_name; + fastcgi_param SCRIPT_FILENAME ${pkgs.git}/bin/git-http-backend; + fastcgi_pass unix:${config.services.fcgiwrap.socketAddress}; + ''; }; }; }; -- cgit 1.4.1