summaryrefslogtreecommitdiff
path: root/flora/services/cgit.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flora/services/cgit.nix')
-rw-r--r--flora/services/cgit.nix14
1 files changed, 9 insertions, 5 deletions
diff --git a/flora/services/cgit.nix b/flora/services/cgit.nix
index 032ec1d..1dae737 100644
--- a/flora/services/cgit.nix
+++ b/flora/services/cgit.nix
@@ -56,10 +56,14 @@ let
'';
in
{
- services.fcgiwrap = {
+ services.fcgiwrap.instances.cgit.process = {
user = "git";
group = "users";
- enable = true;
+ };
+ services.fcgiwrap.instances.cgit.socket = {
+ user = "git";
+ group = "users";
+ mode = "0622";
};
services.nginx.virtualHosts."stuebinm.eu" = {
@@ -69,7 +73,7 @@ in
# this one should come last, behind the git-http-backend blocks
locations."~ /git(/.*)".priority = 1100;
locations."~ /git(/.*)".extraConfig = ''
- fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
+ fastcgi_pass unix:${config.services.fcgiwrap.instances.cgit.socket.address};
include ${pkgs.nginx}/conf/fastcgi_params;
fastcgi_param SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi;
fastcgi_param CGIT_CONFIG ${pkgs.writeText "cgit.conf" cgitconf};
@@ -78,7 +82,7 @@ in
locations."~ /git(/[^/]*/(info/refs|git-(upload|receive)-pack|objects/info/packs))" = {
extraConfig = ''
- fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
+ fastcgi_pass unix:${config.services.fcgiwrap.instances.cgit.socket.address};
include ${pkgs.nginx}/conf/fastcgi_params;
fastcgi_param SCRIPT_FILENAME ${pkgs.gitMinimal}/bin/git-http-backend;
fastcgi_param GIT_HTTP_EXPORT_ALL "";
@@ -89,7 +93,7 @@ in
locations."~ /git/forks(/.*/(info/refs|git-(upload|receive)-pack|objects/info/packs))" = {
extraConfig = ''
- fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
+ fastcgi_pass unix:${config.services.fcgiwrap.instances.cgit.socket.address};
include ${pkgs.nginx}/conf/fastcgi_params;
fastcgi_param SCRIPT_FILENAME ${pkgs.gitMinimal}/bin/git-http-backend;
fastcgi_param GIT_HTTP_EXPORT_ALL "";