* tv: http://HOST/cgit/ -> http://cgit.HOST/
This commit is contained in:
parent
90eff04849
commit
909005ffd5
@ -172,13 +172,13 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment.etc."cgitrc".text = ''
|
environment.etc."cgitrc".text = ''
|
||||||
css=/cgit-static/cgit.css
|
css=/static/cgit.css
|
||||||
logo=/cgit-static/cgit.png
|
logo=/static/cgit.png
|
||||||
|
|
||||||
# if you do not want that webcrawler (like google) index your site
|
# if you do not want that webcrawler (like google) index your site
|
||||||
robots=noindex, nofollow
|
robots=noindex, nofollow
|
||||||
|
|
||||||
virtual-root=/cgit
|
virtual-root=/
|
||||||
|
|
||||||
# TODO make this nicer (and/or somewhere else)
|
# TODO make this nicer (and/or somewhere else)
|
||||||
cache-root=/tmp/cgit
|
cache-root=/tmp/cgit
|
||||||
@ -212,26 +212,28 @@ let
|
|||||||
|
|
||||||
tv.nginx = {
|
tv.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
servers.default.locations = [
|
servers.cgit = {
|
||||||
(nameValuePair "/cgit/" ''
|
server-names = [
|
||||||
|
"cgit.${config.networking.hostName}"
|
||||||
|
"cgit.${config.networking.hostName}.retiolum"
|
||||||
|
];
|
||||||
|
locations = [
|
||||||
|
(nameValuePair "/" ''
|
||||||
include ${pkgs.nginx}/conf/fastcgi_params;
|
include ${pkgs.nginx}/conf/fastcgi_params;
|
||||||
fastcgi_param SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi;
|
fastcgi_param SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi;
|
||||||
fastcgi_split_path_info ^(/cgit/?)(.+)$;
|
fastcgi_param PATH_INFO $uri;
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
||||||
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.socketAddress};
|
||||||
'')
|
'')
|
||||||
(nameValuePair "= /cgit" ''
|
(nameValuePair "/static/" ''
|
||||||
return 301 /cgit/;
|
|
||||||
'')
|
|
||||||
(nameValuePair "/cgit-static/" ''
|
|
||||||
root ${pkgs.cgit}/cgit;
|
root ${pkgs.cgit}/cgit;
|
||||||
rewrite ^/cgit-static(/.*)$ $1 break;
|
rewrite ^/static(/.*)$ $1 break;
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
fcgitwrap-user = {
|
fcgitwrap-user = {
|
||||||
name = "fcgiwrap";
|
name = "fcgiwrap";
|
||||||
|
@ -23,6 +23,7 @@ let
|
|||||||
dc = "tv";
|
dc = "tv";
|
||||||
fqdn = "cd.retiolum";
|
fqdn = "cd.retiolum";
|
||||||
subdomains = [
|
subdomains = [
|
||||||
|
"cgit"
|
||||||
];
|
];
|
||||||
addr = "10.243.113.222";
|
addr = "10.243.113.222";
|
||||||
#addr6 = "42:4522:25f8:36bb:8ccb:0150:231a:2af3";
|
#addr6 = "42:4522:25f8:36bb:8ccb:0150:231a:2af3";
|
||||||
@ -34,6 +35,7 @@ let
|
|||||||
dc = "tv";
|
dc = "tv";
|
||||||
fqdn = "mkdir.retiolum";
|
fqdn = "mkdir.retiolum";
|
||||||
subdomains = [
|
subdomains = [
|
||||||
|
"cgit"
|
||||||
];
|
];
|
||||||
addr = "10.243.113.223";
|
addr = "10.243.113.223";
|
||||||
cores = 1;
|
cores = 1;
|
||||||
@ -43,6 +45,7 @@ let
|
|||||||
dc = "tv";
|
dc = "tv";
|
||||||
fqdn = "nomic.retiolum";
|
fqdn = "nomic.retiolum";
|
||||||
subdomains = [
|
subdomains = [
|
||||||
|
"cgit"
|
||||||
];
|
];
|
||||||
addr = "10.243.0.110";
|
addr = "10.243.0.110";
|
||||||
cores = 2;
|
cores = 2;
|
||||||
@ -52,6 +55,7 @@ let
|
|||||||
dc = "tv";
|
dc = "tv";
|
||||||
fqdn = "rmdir.retiolum";
|
fqdn = "rmdir.retiolum";
|
||||||
subdomains = [
|
subdomains = [
|
||||||
|
"cgit"
|
||||||
];
|
];
|
||||||
addr = "10.243.113.224";
|
addr = "10.243.113.224";
|
||||||
#addr = "42:4522:25f8:36bb:8ccb:0150:231a:2af5";
|
#addr = "42:4522:25f8:36bb:8ccb:0150:231a:2af5";
|
||||||
@ -62,6 +66,7 @@ let
|
|||||||
dc = "tv";
|
dc = "tv";
|
||||||
fqdn = "wu.retiolum";
|
fqdn = "wu.retiolum";
|
||||||
subdomains = [
|
subdomains = [
|
||||||
|
"cgit"
|
||||||
];
|
];
|
||||||
addr = "10.243.13.37";
|
addr = "10.243.13.37";
|
||||||
cores = 8;
|
cores = 8;
|
||||||
|
@ -120,6 +120,7 @@ let
|
|||||||
port=${toString port}
|
port=${toString port}
|
||||||
|
|
||||||
host=$nick
|
host=$nick
|
||||||
|
cgit_endpoint=http://cgit.$host
|
||||||
|
|
||||||
empty=0000000000000000000000000000000000000000
|
empty=0000000000000000000000000000000000000000
|
||||||
|
|
||||||
@ -149,15 +150,15 @@ let
|
|||||||
case $receive_mode in
|
case $receive_mode in
|
||||||
create)
|
create)
|
||||||
#git log --oneline $id2
|
#git log --oneline $id2
|
||||||
link="http://$host/cgit/$GIT_SSH_REPO/?h=$h"
|
link="$cgit_endpoint/$GIT_SSH_REPO/?h=$h"
|
||||||
;;
|
;;
|
||||||
delete)
|
delete)
|
||||||
#git log --oneline $id2
|
#git log --oneline $id2
|
||||||
link="http://$host/cgit/$GIT_SSH_REPO/ ($h)"
|
link="$cgit_endpoint/$GIT_SSH_REPO/ ($h)"
|
||||||
;;
|
;;
|
||||||
fast-forward|non-fast-forward)
|
fast-forward|non-fast-forward)
|
||||||
#git diff --stat $id..$id2
|
#git diff --stat $id..$id2
|
||||||
link="http://$host/cgit/$GIT_SSH_REPO/diff/?h=$h&id=$id&id2=$id2"
|
link="$cgit_endpoint/$GIT_SSH_REPO/diff/?h=$h&id=$id&id2=$id2"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user