]>
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 | ||
2368a4b7 IB |
18 | nixpkgs.overlays = [ (self: super: rec { |
19 | gitweb = super.gitweb.overrideAttrs(old: { | |
10889174 IB |
20 | installPhase = old.installPhase + '' |
21 | cp -r ${./gitweb/theme} $out/gitweb-theme; | |
22 | ''; | |
23 | }); | |
2368a4b7 | 24 | }) ]; |
10889174 | 25 | |
ec2a5ffb | 26 | deployment.keys = mantisbt.keys; |
10889174 IB |
27 | services.myWebsites.tools.modules = |
28 | gitweb.apache.modules ++ | |
29 | mantisbt.apache.modules; | |
a95ab089 IB |
30 | system.extraSystemBuilderCmds = '' |
31 | mkdir -p $out/webapps | |
32 | ln -s ${gitweb.webRoot} $out/webapps/${gitweb.apache.webappName} | |
33 | ln -s ${mantisbt.webRoot} $out/webapps/${mantisbt.apache.webappName} | |
34 | ''; | |
10889174 IB |
35 | |
36 | services.myWebsites.tools.vhostConfs.git = { | |
37 | certName = "eldiron"; | |
38 | hosts = ["git.immae.eu" ]; | |
a95ab089 | 39 | root = gitweb.apache.root; |
10889174 IB |
40 | extraConfig = [ |
41 | gitweb.apache.vhostConf | |
42 | mantisbt.apache.vhostConf | |
43 | '' | |
44 | RewriteEngine on | |
45 | RewriteCond %{REQUEST_URI} ^/releases | |
46 | RewriteRule /releases(.*) https://release.immae.eu$1 [P,L] | |
47 | '' | |
48 | ]; | |
49 | }; | |
50 | services.myPhpfpm.poolConfigs = { | |
51 | mantisbt = mantisbt.phpFpm.pool; | |
52 | }; | |
53 | }; | |
54 | } |