1 with import ../../libs.nix;
5 varDir = "/var/lib/gitolite";
6 webRoot = pkgs.gitweb.overrideAttrs(old: {
7 installPhase = old.installPhase + ''
8 cp -r ${./gitweb} $out/gitweb-theme;
11 config = pkgs.writeText "gitweb.conf" ''
14 # The directories where your projects are. Must not end with a
16 $projectroot = "${varDir}/repositories";
18 $projects_list = "${varDir}/projects.list";
19 $strict_export = "true";
21 # Base URLs for links displayed in the web interface.
22 our @git_base_url_list = qw(ssh://gitolite@git.immae.eu https://git.immae.eu);
24 $feature{'blame'}{'default'} = [1];
25 $feature{'avatar'}{'default'} = ['gravatar'];
26 $feature{'highlight'}{'default'} = [1];
28 @stylesheets = ("gitweb-theme/gitweb.css");
29 $logo = "gitweb-theme/git-logo.png";
30 $favicon = "gitweb-theme/git-favicon.png";
31 $javascript = "gitweb-theme/gitweb.js";
32 $logo_url = "https://git.immae.eu/";
33 $projects_list_group_categories = "true";
34 $projects_list_description_width = 60;
35 $project_list_default_category = "__Others__";
42 SetEnv GIT_PROJECT_ROOT ${varDir}/repositories/
46 objects/(info/[^/]+ | \
47 [0-9a-f]{2}/[0-9a-f]{38} | \
48 pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
49 git-(upload|receive)-pack))$" \
50 ${pkgs.git}/libexec/git-core/git-http-backend/$1
52 <Directory "${pkgs.gitolite}">
55 <Directory "${pkgs.git}/libexec/git-core">
58 <Directory "${webRoot}">
59 DirectoryIndex gitweb.cgi
62 Options ExecCGI FollowSymLinks
65 SetEnv GITWEB_CONFIG "${config}"