summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2016-12-23 18:38:28 +0100
committerlassulus <lass@lassul.us>2016-12-23 18:38:28 +0100
commitb8975f6ed4cde4af3e72f0f83624221ee6351885 (patch)
tree53f0207a1b3009999b42b19c6c919b7c95b0a02b /krebs/3modules
parent1d2c9377bc7b21ff7d27c6c04873a46df083d655 (diff)
parentc208b3fa19fc161f44c52433a4e266daade4ce53 (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/git.nix41
1 files changed, 18 insertions, 23 deletions
diff --git a/krebs/3modules/git.nix b/krebs/3modules/git.nix
index 20907a3ed..164831846 100644
--- a/krebs/3modules/git.nix
+++ b/krebs/3modules/git.nix
@@ -400,29 +400,24 @@ let
chown ${toString cfg.cgit.fcgiwrap.user.uid}:${toString cfg.cgit.fcgiwrap.group.gid} ${cfg.cgit.settings.cache-root}
'';
- krebs.nginx = {
- enable = true;
- servers.cgit = {
- server-names = [
- "cgit.${config.networking.hostName}"
- "cgit.${config.networking.hostName}.r"
- "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;
- '')
- ];
- };
+ services.nginx.virtualHosts.cgit = {
+ serverAliases = [
+ "cgit.${config.networking.hostName}"
+ "cgit.${config.networking.hostName}.r"
+ "cgit.${config.networking.hostName}.retiolum"
+ ];
+ locations."/".extraConfig = ''
+ 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};
+ '';
+ locations."/static/".extraConfig = ''
+ root ${pkgs.cgit}/cgit;
+ rewrite ^/static(/.*)$ $1 break;
+ '';
};
};