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