nixos/nginx: fix gitweb submodule
This commit is contained in:
parent
97e891aee0
commit
073089914e
@ -28,6 +28,7 @@ in
|
|||||||
example = ''
|
example = ''
|
||||||
$feature{'highlight'}{'default'} = [1];
|
$feature{'highlight'}{'default'} = [1];
|
||||||
$feature{'ctags'}{'default'} = [1];
|
$feature{'ctags'}{'default'} = [1];
|
||||||
|
$feature{'avatar'}{'default'} = ['gravatar'];
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -22,36 +22,31 @@ in
|
|||||||
|
|
||||||
config = mkIf config.services.nginx.gitweb.enable {
|
config = mkIf config.services.nginx.gitweb.enable {
|
||||||
|
|
||||||
systemd.sockets.gitweb = {
|
|
||||||
description = "GitWeb Listen Socket";
|
|
||||||
listenStreams = [ "/run/gitweb.sock" ];
|
|
||||||
socketConfig = {
|
|
||||||
Accept = "false";
|
|
||||||
SocketUser = "nginx";
|
|
||||||
SocketGroup = "nginx";
|
|
||||||
SocketMode = "0600";
|
|
||||||
};
|
|
||||||
wantedBy = [ "sockets.target" ];
|
|
||||||
};
|
|
||||||
systemd.services.gitweb = {
|
systemd.services.gitweb = {
|
||||||
description = "GitWeb service";
|
description = "GitWeb service";
|
||||||
script = "${git}/share/gitweb/gitweb.cgi --fcgi";
|
script = "${pkgs.git}/share/gitweb/gitweb.cgi --fastcgi --nproc=1";
|
||||||
|
environment = {
|
||||||
|
FCGI_SOCKET_PATH = "/run/gitweb/gitweb.sock";
|
||||||
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
|
||||||
StandardInput = "socket";
|
|
||||||
User = "nginx";
|
User = "nginx";
|
||||||
Group = "nginx";
|
Group = "nginx";
|
||||||
|
RuntimeDirectory = [ "gitweb" ];
|
||||||
};
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
virtualHosts.default = {
|
virtualHosts.default = {
|
||||||
locations."/gitweb" = {
|
locations."/gitweb/" = {
|
||||||
root = "${pkgs.git}/share/gitweb";
|
root = "${pkgs.git}/share";
|
||||||
|
tryFiles = "$uri @gitweb";
|
||||||
|
};
|
||||||
|
locations."@gitweb" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
include ${pkgs.nginx}/conf/fastcgi_params;
|
include ${pkgs.nginx}/conf/fastcgi_params;
|
||||||
fastcgi_param GITWEB_CONFIG ${cfg.gitwebConfigFile};
|
fastcgi_param GITWEB_CONFIG ${cfg.gitwebConfigFile};
|
||||||
fastcgi_pass unix:/run/gitweb.sock;
|
fastcgi_pass unix:/run/gitweb/gitweb.sock;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user