cgit: use services.fcgiwrap.instances
This commit is contained in:
parent
3f4467a8d1
commit
10a198ffab
@ -391,12 +391,12 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.fcgiwrap = {
|
services.fcgiwrap.instances.cgit = {
|
||||||
enable = true;
|
process.user = cfg.cgit.fcgiwrap.user.name;
|
||||||
user = cfg.cgit.fcgiwrap.user.name;
|
process.group = cfg.cgit.fcgiwrap.group.name;
|
||||||
group = cfg.cgit.fcgiwrap.group.name;
|
socket.user = cfg.cgit.fcgiwrap.user.name;
|
||||||
# socketAddress = "/run/fcgiwrap.sock" (default)
|
socket.group = config.services.nginx.group;
|
||||||
# socketType = "unix" (default)
|
socket.mode = "0660";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc."cgitrc".text = let
|
environment.etc."cgitrc".text = let
|
||||||
@ -460,7 +460,7 @@ let
|
|||||||
fastcgi_param PATH_INFO $uri;
|
fastcgi_param PATH_INFO $uri;
|
||||||
fastcgi_param QUERY_STRING $args;
|
fastcgi_param QUERY_STRING $args;
|
||||||
fastcgi_param HTTP_HOST $server_name;
|
fastcgi_param HTTP_HOST $server_name;
|
||||||
fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
|
fastcgi_pass unix:${config.services.fcgiwrap.instances.cgit.socket.address};
|
||||||
'';
|
'';
|
||||||
# Smart HTTP transport. Regex based on.
|
# Smart HTTP transport. Regex based on.
|
||||||
# https://github.com/git/git/blob/v2.27.0/http-backend.c#L708-L721
|
# https://github.com/git/git/blob/v2.27.0/http-backend.c#L708-L721
|
||||||
@ -480,7 +480,7 @@ let
|
|||||||
}};
|
}};
|
||||||
fastcgi_param PATH_INFO $fastcgi_script_name;
|
fastcgi_param PATH_INFO $fastcgi_script_name;
|
||||||
fastcgi_param SCRIPT_FILENAME ${pkgs.git}/bin/git-http-backend;
|
fastcgi_param SCRIPT_FILENAME ${pkgs.git}/bin/git-http-backend;
|
||||||
fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
|
fastcgi_pass unix:${config.services.fcgiwrap.instances.cgit.socket.address};
|
||||||
'';
|
'';
|
||||||
locations."/static/".extraConfig = ''
|
locations."/static/".extraConfig = ''
|
||||||
root ${pkgs.cgit}/cgit;
|
root ${pkgs.cgit}/cgit;
|
||||||
|
Loading…
Reference in New Issue
Block a user