diff options
Diffstat (limited to 'nixops/modules/websites/tools/git')
-rw-r--r-- | nixops/modules/websites/tools/git/default.nix | 7 | ||||
-rw-r--r-- | nixops/modules/websites/tools/git/gitweb/gitweb.nix | 9 | ||||
-rw-r--r-- | nixops/modules/websites/tools/git/mantisbt/mantisbt.nix | 10 |
3 files changed, 16 insertions, 10 deletions
diff --git a/nixops/modules/websites/tools/git/default.nix b/nixops/modules/websites/tools/git/default.nix index 91aa1d0..2aa86cd 100644 --- a/nixops/modules/websites/tools/git/default.nix +++ b/nixops/modules/websites/tools/git/default.nix | |||
@@ -26,11 +26,16 @@ in { | |||
26 | services.myWebsites.tools.modules = | 26 | services.myWebsites.tools.modules = |
27 | gitweb.apache.modules ++ | 27 | gitweb.apache.modules ++ |
28 | mantisbt.apache.modules; | 28 | mantisbt.apache.modules; |
29 | system.extraSystemBuilderCmds = '' | ||
30 | mkdir -p $out/webapps | ||
31 | ln -s ${gitweb.webRoot} $out/webapps/${gitweb.apache.webappName} | ||
32 | ln -s ${mantisbt.webRoot} $out/webapps/${mantisbt.apache.webappName} | ||
33 | ''; | ||
29 | 34 | ||
30 | services.myWebsites.tools.vhostConfs.git = { | 35 | services.myWebsites.tools.vhostConfs.git = { |
31 | certName = "eldiron"; | 36 | certName = "eldiron"; |
32 | hosts = ["git.immae.eu" ]; | 37 | hosts = ["git.immae.eu" ]; |
33 | root = gitweb.webRoot; | 38 | root = gitweb.apache.root; |
34 | extraConfig = [ | 39 | extraConfig = [ |
35 | gitweb.apache.vhostConf | 40 | gitweb.apache.vhostConf |
36 | mantisbt.apache.vhostConf | 41 | mantisbt.apache.vhostConf |
diff --git a/nixops/modules/websites/tools/git/gitweb/gitweb.nix b/nixops/modules/websites/tools/git/gitweb/gitweb.nix index 22c70f2..2ee7a63 100644 --- a/nixops/modules/websites/tools/git/gitweb/gitweb.nix +++ b/nixops/modules/websites/tools/git/gitweb/gitweb.nix | |||
@@ -29,10 +29,12 @@ rec { | |||
29 | $project_list_default_category = "__Others__"; | 29 | $project_list_default_category = "__Others__"; |
30 | $highlight_bin = "${highlight}/bin/highlight"; | 30 | $highlight_bin = "${highlight}/bin/highlight"; |
31 | ''; | 31 | ''; |
32 | apache = { | 32 | apache = rec { |
33 | user = "wwwrun"; | 33 | user = "wwwrun"; |
34 | group = "wwwrun"; | 34 | group = "wwwrun"; |
35 | modules = [ "cgid" ]; | 35 | modules = [ "cgid" ]; |
36 | webappName = "tools_gitweb"; | ||
37 | root = "/run/current-system/webapps/${webappName}"; | ||
36 | vhostConf = '' | 38 | vhostConf = '' |
37 | SetEnv GIT_PROJECT_ROOT ${varDir}/repositories/ | 39 | SetEnv GIT_PROJECT_ROOT ${varDir}/repositories/ |
38 | ScriptAliasMatch \ | 40 | ScriptAliasMatch \ |
@@ -44,13 +46,10 @@ rec { | |||
44 | git-(upload|receive)-pack))$" \ | 46 | git-(upload|receive)-pack))$" \ |
45 | ${git}/libexec/git-core/git-http-backend/$1 | 47 | ${git}/libexec/git-core/git-http-backend/$1 |
46 | 48 | ||
47 | <Directory "${gitolite}"> | ||
48 | Require all granted | ||
49 | </Directory> | ||
50 | <Directory "${git}/libexec/git-core"> | 49 | <Directory "${git}/libexec/git-core"> |
51 | Require all granted | 50 | Require all granted |
52 | </Directory> | 51 | </Directory> |
53 | <Directory "${webRoot}"> | 52 | <Directory "${root}"> |
54 | DirectoryIndex gitweb.cgi | 53 | DirectoryIndex gitweb.cgi |
55 | Require all granted | 54 | Require all granted |
56 | AllowOverride None | 55 | AllowOverride None |
diff --git a/nixops/modules/websites/tools/git/mantisbt/mantisbt.nix b/nixops/modules/websites/tools/git/mantisbt/mantisbt.nix index b1837eb..9bb8476 100644 --- a/nixops/modules/websites/tools/git/mantisbt/mantisbt.nix +++ b/nixops/modules/websites/tools/git/mantisbt/mantisbt.nix | |||
@@ -72,13 +72,15 @@ let | |||
72 | ln -s ${plugins.source-integration}/Source* $out/plugins/ | 72 | ln -s ${plugins.source-integration}/Source* $out/plugins/ |
73 | ''; | 73 | ''; |
74 | }; | 74 | }; |
75 | apache = { | 75 | apache = rec { |
76 | user = "wwwrun"; | 76 | user = "wwwrun"; |
77 | group = "wwwrun"; | 77 | group = "wwwrun"; |
78 | modules = [ "proxy_fcgi" ]; | 78 | modules = [ "proxy_fcgi" ]; |
79 | webappName = "tools_mantisbt"; | ||
80 | root = "/run/current-system/webapps/${webappName}"; | ||
79 | vhostConf = '' | 81 | vhostConf = '' |
80 | Alias /mantisbt "${webRoot}" | 82 | Alias /mantisbt "${root}" |
81 | <Directory "${webRoot}"> | 83 | <Directory "${root}"> |
82 | DirectoryIndex index.php | 84 | DirectoryIndex index.php |
83 | <FilesMatch "\.php$"> | 85 | <FilesMatch "\.php$"> |
84 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" | 86 | SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" |
@@ -88,7 +90,7 @@ let | |||
88 | Options FollowSymlinks | 90 | Options FollowSymlinks |
89 | Require all granted | 91 | Require all granted |
90 | </Directory> | 92 | </Directory> |
91 | <Directory "${webRoot}/admin"> | 93 | <Directory "${root}/admin"> |
92 | #Reenable during upgrade | 94 | #Reenable during upgrade |
93 | Require all denied | 95 | Require all denied |
94 | </Directory> | 96 | </Directory> |