]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - modules/private/websites/tools/git/default.nix
Add chatons infos
[perso/Immae/Config/Nix.git] / modules / private / websites / tools / git / default.nix
1 { lib, pkgs, config, ... }:
2 let
3 mantisbt = pkgs.callPackage ./mantisbt.nix {
4 inherit (pkgs.webapps) mantisbt_2 mantisbt_2-plugins;
5 env = config.myEnv.tools.mantisbt;
6 inherit config;
7 };
8 gitweb = pkgs.callPackage ./gitweb.nix {
9 gitoliteDir = config.myServices.gitolite.gitoliteDir;
10 };
11
12 cfg = config.myServices.websites.tools.git;
13 in {
14 options.myServices.websites.tools.git = {
15 enable = lib.mkEnableOption "enable git's website";
16 };
17
18 config = lib.mkIf cfg.enable {
19 myServices.chatonsProperties.services.mantisbt = {
20 file.datetime = "2022-08-21T10:08:00";
21 service = {
22 name = "MantisBT";
23 description = "Mantis Bug Tracker";
24 website = "https://git.immae.eu/mantisbt";
25 logo = "https://git.immae.eu/mantisbt/images/favicon.ico";
26 status.level = "OK";
27 status.description = "OK";
28 registration."" = ["MEMBER" "CLIENT"];
29 registration.load = "OPEN";
30 install.type = "PACKAGE";
31 guide.user = "https://www.immae.eu/docs/forge-logicielle.html";
32 };
33 software = {
34 name = "MantisBT";
35 website = "https://mantisbt.org/";
36 license.url = "https://opensource.org/licenses/gpl-license";
37 license.name = "GNU General Public License";
38 version = mantisbt.webRoot.version;
39 source.url = "https://github.com/mantisbt/mantisbt";
40 modules = mantisbt.webRoot.pluginNames;
41 };
42 };
43 secrets.keys = mantisbt.keys;
44 services.websites.env.tools.modules =
45 gitweb.apache.modules ++
46 mantisbt.apache.modules;
47
48 system.activationScripts.mantisbt = mantisbt.activationScript;
49 services.websites.env.tools.vhostConfs.git = {
50 certName = "eldiron";
51 addToCerts = true;
52 hosts = ["git.immae.eu" ];
53 root = gitweb.apache.root;
54 extraConfig = [
55 gitweb.apache.vhostConf
56 (mantisbt.apache.vhostConf config.services.phpfpm.pools.mantisbt.socket)
57 ''
58 RewriteEngine on
59 RewriteCond %{REQUEST_URI} ^/releases
60 RewriteRule /releases(.*) https://release.immae.eu$1 [P,L]
61 ''
62 ];
63 };
64 services.phpfpm.pools = {
65 mantisbt = {
66 user = config.services.httpd.Tools.user;
67 group = config.services.httpd.Tools.group;
68 settings = mantisbt.phpFpm.pool;
69 phpPackage = pkgs.php72;
70 };
71 };
72 };
73 }