summaryrefslogtreecommitdiffstats
path: root/3modules
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-07-16 18:09:37 +0200
committertv <tv@shackspace.de>2015-07-16 22:48:26 +0200
commit909005ffd5bd019ca2ee4375fb768b737a835415 (patch)
treefcdfd496cba0aa85f2752d0170ec5cf69f88205b /3modules
parent90eff048495e9cac767644dac1083374ecc521a1 (diff)
* tv: http://HOST/cgit/ -> http://cgit.HOST/
Diffstat (limited to '3modules')
-rw-r--r--3modules/tv/git.nix44
-rw-r--r--3modules/tv/identity.nix5
2 files changed, 28 insertions, 21 deletions
diff --git a/3modules/tv/git.nix b/3modules/tv/git.nix
index caa53d566..8d2ab482d 100644
--- a/3modules/tv/git.nix
+++ b/3modules/tv/git.nix
@@ -172,13 +172,13 @@ let
};
environment.etc."cgitrc".text = ''
- css=/cgit-static/cgit.css
- logo=/cgit-static/cgit.png
+ css=/static/cgit.css
+ logo=/static/cgit.png
# if you do not want that webcrawler (like google) index your site
robots=noindex, nofollow
- virtual-root=/cgit
+ virtual-root=/
# TODO make this nicer (and/or somewhere else)
cache-root=/tmp/cgit
@@ -212,24 +212,26 @@ let
tv.nginx = {
enable = true;
- servers.default.locations = [
- (nameValuePair "/cgit/" ''
- include ${pkgs.nginx}/conf/fastcgi_params;
- fastcgi_param SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi;
- fastcgi_split_path_info ^(/cgit/?)(.+)$;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_param QUERY_STRING $args;
- fastcgi_param HTTP_HOST $server_name;
- fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
- '')
- (nameValuePair "= /cgit" ''
- return 301 /cgit/;
- '')
- (nameValuePair "/cgit-static/" ''
- root ${pkgs.cgit}/cgit;
- rewrite ^/cgit-static(/.*)$ $1 break;
- '')
- ];
+ servers.cgit = {
+ server-names = [
+ "cgit.${config.networking.hostName}"
+ "cgit.${config.networking.hostName}.retiolum"
+ ];
+ locations = [
+ (nameValuePair "/" ''
+ include ${pkgs.nginx}/conf/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi;
+ fastcgi_param PATH_INFO $uri;
+ fastcgi_param QUERY_STRING $args;
+ fastcgi_param HTTP_HOST $server_name;
+ fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
+ '')
+ (nameValuePair "/static/" ''
+ root ${pkgs.cgit}/cgit;
+ rewrite ^/static(/.*)$ $1 break;
+ '')
+ ];
+ };
};
};
diff --git a/3modules/tv/identity.nix b/3modules/tv/identity.nix
index e0cd46c06..ed7eb5703 100644
--- a/3modules/tv/identity.nix
+++ b/3modules/tv/identity.nix
@@ -23,6 +23,7 @@ let
dc = "tv";
fqdn = "cd.retiolum";
subdomains = [
+ "cgit"
];
addr = "10.243.113.222";
#addr6 = "42:4522:25f8:36bb:8ccb:0150:231a:2af3";
@@ -34,6 +35,7 @@ let
dc = "tv";
fqdn = "mkdir.retiolum";
subdomains = [
+ "cgit"
];
addr = "10.243.113.223";
cores = 1;
@@ -43,6 +45,7 @@ let
dc = "tv";
fqdn = "nomic.retiolum";
subdomains = [
+ "cgit"
];
addr = "10.243.0.110";
cores = 2;
@@ -52,6 +55,7 @@ let
dc = "tv";
fqdn = "rmdir.retiolum";
subdomains = [
+ "cgit"
];
addr = "10.243.113.224";
#addr = "42:4522:25f8:36bb:8ccb:0150:231a:2af5";
@@ -62,6 +66,7 @@ let
dc = "tv";
fqdn = "wu.retiolum";
subdomains = [
+ "cgit"
];
addr = "10.243.13.37";
cores = 8;