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