cgit service: use services.nginx.virtualHosts
This commit is contained in:
parent
f063555eda
commit
4955ba48c1
@ -400,29 +400,24 @@ let
|
|||||||
chown ${toString cfg.cgit.fcgiwrap.user.uid}:${toString cfg.cgit.fcgiwrap.group.gid} ${cfg.cgit.settings.cache-root}
|
chown ${toString cfg.cgit.fcgiwrap.user.uid}:${toString cfg.cgit.fcgiwrap.group.gid} ${cfg.cgit.settings.cache-root}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
krebs.nginx = {
|
services.nginx.virtualHosts.cgit = {
|
||||||
enable = true;
|
serverAliases = [
|
||||||
servers.cgit = {
|
"cgit.${config.networking.hostName}"
|
||||||
server-names = [
|
"cgit.${config.networking.hostName}.r"
|
||||||
"cgit.${config.networking.hostName}"
|
"cgit.${config.networking.hostName}.retiolum"
|
||||||
"cgit.${config.networking.hostName}.r"
|
];
|
||||||
"cgit.${config.networking.hostName}.retiolum"
|
locations."/".extraConfig = ''
|
||||||
];
|
include ${pkgs.nginx}/conf/fastcgi_params;
|
||||||
locations = [
|
fastcgi_param SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi;
|
||||||
(nameValuePair "/" ''
|
fastcgi_param PATH_INFO $uri;
|
||||||
include ${pkgs.nginx}/conf/fastcgi_params;
|
fastcgi_param QUERY_STRING $args;
|
||||||
fastcgi_param SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi;
|
fastcgi_param HTTP_HOST $server_name;
|
||||||
fastcgi_param PATH_INFO $uri;
|
fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
|
||||||
fastcgi_param QUERY_STRING $args;
|
'';
|
||||||
fastcgi_param HTTP_HOST $server_name;
|
locations."/static/".extraConfig = ''
|
||||||
fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
|
root ${pkgs.cgit}/cgit;
|
||||||
'')
|
rewrite ^/static(/.*)$ $1 break;
|
||||||
(nameValuePair "/static/" ''
|
'';
|
||||||
root ${pkgs.cgit}/cgit;
|
|
||||||
rewrite ^/static(/.*)$ $1 break;
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user