]>
Commit | Line | Data |
---|---|---|
ab8f306d | 1 | { lib, pkgs, config, ... }: |
10889174 | 2 | let |
43dac87f | 3 | mantisbt = pkgs.callPackage ./mantisbt.nix { |
43dac87f | 4 | inherit (pkgs.webapps) mantisbt_2 mantisbt_2-plugins; |
ab8f306d | 5 | env = config.myEnv.tools.mantisbt; |
9d90e7e2 | 6 | }; |
8d213e2b IB |
7 | gitweb = pkgs.callPackage ./gitweb.nix { |
8 | gitoliteDir = config.myServices.gitolite.gitoliteDir; | |
9 | }; | |
10889174 | 10 | |
4288c2f2 | 11 | cfg = config.myServices.websites.tools.git; |
10889174 | 12 | in { |
4288c2f2 | 13 | options.myServices.websites.tools.git = { |
10889174 IB |
14 | enable = lib.mkEnableOption "enable git's website"; |
15 | }; | |
16 | ||
17 | config = lib.mkIf cfg.enable { | |
1a718805 | 18 | secrets.keys = mantisbt.keys; |
29f8cb85 | 19 | services.websites.env.tools.modules = |
10889174 IB |
20 | gitweb.apache.modules ++ |
21 | mantisbt.apache.modules; | |
4288c2f2 IB |
22 | myServices.websites.webappDirs."${gitweb.apache.webappName}" = gitweb.webRoot; |
23 | myServices.websites.webappDirs."${mantisbt.apache.webappName}" = mantisbt.webRoot; | |
10889174 | 24 | |
4288c2f2 | 25 | system.activationScripts.mantisbt = mantisbt.activationScript; |
29f8cb85 | 26 | services.websites.env.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 | }; | |
f40f5b23 | 41 | services.phpfpm.poolConfigs = { |
10889174 IB |
42 | mantisbt = mantisbt.phpFpm.pool; |
43 | }; | |
44 | }; | |
45 | } |