]>
Commit | Line | Data |
---|---|---|
8a964143 | 1 | { lib, pkgs, config, myconfig, ... }: |
10889174 | 2 | let |
43dac87f | 3 | mantisbt = pkgs.callPackage ./mantisbt.nix { |
43dac87f | 4 | inherit (pkgs.webapps) mantisbt_2 mantisbt_2-plugins; |
9d90e7e2 IB |
5 | env = myconfig.env.tools.mantisbt; |
6 | }; | |
43dac87f | 7 | gitweb = pkgs.callPackage ./gitweb.nix { gitoliteDir = config.services.myGitolite.gitoliteDir; }; |
10889174 IB |
8 | |
9 | cfg = config.services.myWebsites.tools.git; | |
10 | in { | |
11 | options.services.myWebsites.tools.git = { | |
12 | enable = lib.mkEnableOption "enable git's website"; | |
13 | }; | |
14 | ||
15 | config = lib.mkIf cfg.enable { | |
1a718805 | 16 | secrets.keys = mantisbt.keys; |
daf64e3f | 17 | services.websites.tools.modules = |
10889174 IB |
18 | gitweb.apache.modules ++ |
19 | mantisbt.apache.modules; | |
a95ab089 IB |
20 | system.extraSystemBuilderCmds = '' |
21 | mkdir -p $out/webapps | |
22 | ln -s ${gitweb.webRoot} $out/webapps/${gitweb.apache.webappName} | |
23 | ln -s ${mantisbt.webRoot} $out/webapps/${mantisbt.apache.webappName} | |
24 | ''; | |
10889174 | 25 | |
daf64e3f | 26 | services.websites.tools.vhostConfs.git = { |
10889174 | 27 | certName = "eldiron"; |
7df420c2 | 28 | addToCerts = true; |
10889174 | 29 | hosts = ["git.immae.eu" ]; |
a95ab089 | 30 | root = gitweb.apache.root; |
10889174 IB |
31 | extraConfig = [ |
32 | gitweb.apache.vhostConf | |
33 | mantisbt.apache.vhostConf | |
34 | '' | |
35 | RewriteEngine on | |
36 | RewriteCond %{REQUEST_URI} ^/releases | |
37 | RewriteRule /releases(.*) https://release.immae.eu$1 [P,L] | |
38 | '' | |
39 | ]; | |
40 | }; | |
41 | services.myPhpfpm.poolConfigs = { | |
42 | mantisbt = mantisbt.phpFpm.pool; | |
43 | }; | |
44 | }; | |
45 | } |