diff options
author | Silas Schöffel <sils@sils.li> | 2024-06-20 10:27:20 +0200 |
---|---|---|
committer | Silas Schöffel <sils@sils.li> | 2024-06-20 10:27:20 +0200 |
commit | 9ba330ab1a2bcf3ab26b1aeb7a189c44fa64d393 (patch) | |
tree | ad2c810ee1ccd22ebf60690d5f3d131c9db0fb2b /modules/nixos | |
parent | fix(git-server): enable http-clone through cgit (diff) | |
download | nixos-server-9ba330ab1a2bcf3ab26b1aeb7a189c44fa64d393.tar.gz nixos-server-9ba330ab1a2bcf3ab26b1aeb7a189c44fa64d393.zip |
feat(git-server): enable http-push git-http
Diffstat (limited to '')
-rw-r--r-- | modules/nixos/vhack/git-server.nix | 8 |
1 files changed, 8 insertions, 0 deletions
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}; + ''; }; }; }; |