]>
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; |
da30ae4f | 6 | inherit config; |
9d90e7e2 | 7 | }; |
8d213e2b IB |
8 | gitweb = pkgs.callPackage ./gitweb.nix { |
9 | gitoliteDir = config.myServices.gitolite.gitoliteDir; | |
10 | }; | |
10889174 | 11 | |
4288c2f2 | 12 | cfg = config.myServices.websites.tools.git; |
10889174 | 13 | in { |
4288c2f2 | 14 | options.myServices.websites.tools.git = { |
10889174 IB |
15 | enable = lib.mkEnableOption "enable git's website"; |
16 | }; | |
17 | ||
18 | config = lib.mkIf cfg.enable { | |
1a718805 | 19 | secrets.keys = mantisbt.keys; |
29f8cb85 | 20 | services.websites.env.tools.modules = |
10889174 IB |
21 | gitweb.apache.modules ++ |
22 | mantisbt.apache.modules; | |
d3452fc5 IB |
23 | services.websites.webappDirs."${gitweb.apache.webappName}" = gitweb.webRoot; |
24 | services.websites.webappDirs."${mantisbt.apache.webappName}" = mantisbt.webRoot; | |
10889174 | 25 | |
4288c2f2 | 26 | system.activationScripts.mantisbt = mantisbt.activationScript; |
29f8cb85 | 27 | services.websites.env.tools.vhostConfs.git = { |
10889174 | 28 | certName = "eldiron"; |
7df420c2 | 29 | addToCerts = true; |
10889174 | 30 | hosts = ["git.immae.eu" ]; |
a95ab089 | 31 | root = gitweb.apache.root; |
10889174 IB |
32 | extraConfig = [ |
33 | gitweb.apache.vhostConf | |
5400b9b6 | 34 | (mantisbt.apache.vhostConf config.services.phpfpm.pools.mantisbt.socket) |
10889174 IB |
35 | '' |
36 | RewriteEngine on | |
37 | RewriteCond %{REQUEST_URI} ^/releases | |
38 | RewriteRule /releases(.*) https://release.immae.eu$1 [P,L] | |
39 | '' | |
40 | ]; | |
41 | }; | |
441da8aa IB |
42 | services.phpfpm.pools = { |
43 | mantisbt = { | |
5400b9b6 IB |
44 | user = config.services.httpd.Tools.user; |
45 | group = config.services.httpd.Tools.group; | |
46 | settings = mantisbt.phpFpm.pool; | |
dcac3ec7 | 47 | phpPackage = pkgs.php72; |
441da8aa | 48 | }; |
10889174 IB |
49 | }; |
50 | }; | |
51 | } |