]>
Commit | Line | Data |
---|---|---|
9d90e7e2 | 1 | { lib, pkgs, config, myconfig, mylibs, ... }: |
10889174 | 2 | let |
9d90e7e2 IB |
3 | mantisbt = pkgs.callPackage ./mantisbt/mantisbt.nix { |
4 | inherit (mylibs) fetchedGithub; | |
5 | env = myconfig.env.tools.mantisbt; | |
6 | }; | |
10889174 IB |
7 | gitweb = pkgs.callPackage ./gitweb/gitweb.nix { gitoliteDir = config.services.myGitolite.gitoliteDir; }; |
8 | ||
9 | cfg = config.services.myWebsites.tools.git; | |
10 | in { | |
11 | options.services.myWebsites.tools.git = { | |
12 | enable = lib.mkEnableOption "enable git's website"; | |
13 | }; | |
14 | ||
15 | config = lib.mkIf cfg.enable { | |
10889174 IB |
16 | security.acme.certs."eldiron".extraDomains."git.immae.eu" = null; |
17 | ||
18 | nixpkgs.config.packageOverrides = oldpkgs: rec { | |
19 | gitweb = oldpkgs.gitweb.overrideAttrs(old: { | |
20 | installPhase = old.installPhase + '' | |
21 | cp -r ${./gitweb/theme} $out/gitweb-theme; | |
22 | ''; | |
23 | }); | |
24 | }; | |
25 | ||
26 | services.myWebsites.tools.modules = | |
27 | gitweb.apache.modules ++ | |
28 | mantisbt.apache.modules; | |
a95ab089 IB |
29 | system.extraSystemBuilderCmds = '' |
30 | mkdir -p $out/webapps | |
31 | ln -s ${gitweb.webRoot} $out/webapps/${gitweb.apache.webappName} | |
32 | ln -s ${mantisbt.webRoot} $out/webapps/${mantisbt.apache.webappName} | |
33 | ''; | |
10889174 IB |
34 | |
35 | services.myWebsites.tools.vhostConfs.git = { | |
36 | certName = "eldiron"; | |
37 | hosts = ["git.immae.eu" ]; | |
a95ab089 | 38 | root = gitweb.apache.root; |
10889174 IB |
39 | extraConfig = [ |
40 | gitweb.apache.vhostConf | |
41 | mantisbt.apache.vhostConf | |
42 | '' | |
43 | RewriteEngine on | |
44 | RewriteCond %{REQUEST_URI} ^/releases | |
45 | RewriteRule /releases(.*) https://release.immae.eu$1 [P,L] | |
46 | '' | |
47 | ]; | |
48 | }; | |
49 | services.myPhpfpm.poolConfigs = { | |
50 | mantisbt = mantisbt.phpFpm.pool; | |
51 | }; | |
52 | }; | |
53 | } |