diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-22 20:01:33 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-22 20:01:33 +0200 |
commit | 4288c2f2431fb782b0d512b1b3749187f2374b6a (patch) | |
tree | aaf812414f91d6b695a7507265e7572de8dc477c /nixops/modules/websites/tools/git/gitweb.nix | |
parent | f40f5b235b890f46770a22f005f8a0f664cf0562 (diff) | |
download | Nix-4288c2f2431fb782b0d512b1b3749187f2374b6a.tar.gz Nix-4288c2f2431fb782b0d512b1b3749187f2374b6a.tar.zst Nix-4288c2f2431fb782b0d512b1b3749187f2374b6a.zip |
Move websites/tools to modules
Diffstat (limited to 'nixops/modules/websites/tools/git/gitweb.nix')
-rw-r--r-- | nixops/modules/websites/tools/git/gitweb.nix | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/nixops/modules/websites/tools/git/gitweb.nix b/nixops/modules/websites/tools/git/gitweb.nix deleted file mode 100644 index 2ee7a63..0000000 --- a/nixops/modules/websites/tools/git/gitweb.nix +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | { gitweb, writeText, gitolite, git, gitoliteDir, highlight }: | ||
2 | rec { | ||
3 | varDir = gitoliteDir; | ||
4 | webRoot = gitweb; | ||
5 | config = writeText "gitweb.conf" '' | ||
6 | $git_temp = "/tmp"; | ||
7 | |||
8 | # The directories where your projects are. Must not end with a | ||
9 | # slash. | ||
10 | $projectroot = "${varDir}/repositories"; | ||
11 | |||
12 | $projects_list = "${varDir}/projects.list"; | ||
13 | $strict_export = "true"; | ||
14 | |||
15 | # Base URLs for links displayed in the web interface. | ||
16 | our @git_base_url_list = qw(ssh://gitolite@git.immae.eu https://git.immae.eu); | ||
17 | |||
18 | $feature{'blame'}{'default'} = [1]; | ||
19 | $feature{'avatar'}{'default'} = ['gravatar']; | ||
20 | $feature{'highlight'}{'default'} = [1]; | ||
21 | |||
22 | @stylesheets = ("gitweb-theme/gitweb.css"); | ||
23 | $logo = "gitweb-theme/git-logo.png"; | ||
24 | $favicon = "gitweb-theme/git-favicon.png"; | ||
25 | $javascript = "gitweb-theme/gitweb.js"; | ||
26 | $logo_url = "https://git.immae.eu/"; | ||
27 | $projects_list_group_categories = "true"; | ||
28 | $projects_list_description_width = 60; | ||
29 | $project_list_default_category = "__Others__"; | ||
30 | $highlight_bin = "${highlight}/bin/highlight"; | ||
31 | ''; | ||
32 | apache = rec { | ||
33 | user = "wwwrun"; | ||
34 | group = "wwwrun"; | ||
35 | modules = [ "cgid" ]; | ||
36 | webappName = "tools_gitweb"; | ||
37 | root = "/run/current-system/webapps/${webappName}"; | ||
38 | vhostConf = '' | ||
39 | SetEnv GIT_PROJECT_ROOT ${varDir}/repositories/ | ||
40 | ScriptAliasMatch \ | ||
41 | "(?x)^/(.*/(HEAD | \ | ||
42 | info/refs | \ | ||
43 | objects/(info/[^/]+ | \ | ||
44 | [0-9a-f]{2}/[0-9a-f]{38} | \ | ||
45 | pack/pack-[0-9a-f]{40}\.(pack|idx)) | \ | ||
46 | git-(upload|receive)-pack))$" \ | ||
47 | ${git}/libexec/git-core/git-http-backend/$1 | ||
48 | |||
49 | <Directory "${git}/libexec/git-core"> | ||
50 | Require all granted | ||
51 | </Directory> | ||
52 | <Directory "${root}"> | ||
53 | DirectoryIndex gitweb.cgi | ||
54 | Require all granted | ||
55 | AllowOverride None | ||
56 | Options ExecCGI FollowSymLinks | ||
57 | <Files gitweb.cgi> | ||
58 | SetHandler cgi-script | ||
59 | SetEnv GITWEB_CONFIG "${config}" | ||
60 | </Files> | ||
61 | </Directory> | ||
62 | ''; | ||
63 | }; | ||
64 | } | ||