]>
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; | |
23 | ||
4288c2f2 | 24 | system.activationScripts.mantisbt = mantisbt.activationScript; |
29f8cb85 | 25 | services.websites.env.tools.vhostConfs.git = { |
10889174 | 26 | certName = "eldiron"; |
7df420c2 | 27 | addToCerts = true; |
10889174 | 28 | hosts = ["git.immae.eu" ]; |
a95ab089 | 29 | root = gitweb.apache.root; |
10889174 IB |
30 | extraConfig = [ |
31 | gitweb.apache.vhostConf | |
5400b9b6 | 32 | (mantisbt.apache.vhostConf config.services.phpfpm.pools.mantisbt.socket) |
10889174 IB |
33 | '' |
34 | RewriteEngine on | |
35 | RewriteCond %{REQUEST_URI} ^/releases | |
36 | RewriteRule /releases(.*) https://release.immae.eu$1 [P,L] | |
37 | '' | |
38 | ]; | |
39 | }; | |
441da8aa IB |
40 | services.phpfpm.pools = { |
41 | mantisbt = { | |
5400b9b6 IB |
42 | user = config.services.httpd.Tools.user; |
43 | group = config.services.httpd.Tools.group; | |
44 | settings = mantisbt.phpFpm.pool; | |
dcac3ec7 | 45 | phpPackage = pkgs.php72; |
441da8aa | 46 | }; |
10889174 IB |
47 | }; |
48 | }; | |
49 | } |