]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - virtual/modules/gitweb/default.nix
Make mysqli a shared extension, and load it where necessary
[perso/Immae/Config/Nix.git] / virtual / modules / gitweb / default.nix
1 { lib, pkgs, config, mylibs, ... }:
2 let
3 # FIXME: add buildbot
4 gitweb = pkgs.callPackage ./gitweb.nix { gitoliteDir = config.services.myGitolite.gitoliteDir; };
5 cfg = config.services.myGitweb;
6 in {
7 options.services.myGitweb = {
8 enable = lib.mkEnableOption "my gitweb service";
9 };
10
11 config = lib.mkIf cfg.enable {
12 security.acme.certs."eldiron".extraDomains."git.immae.eu" = null;
13
14 nixpkgs.config.packageOverrides = oldpkgs: rec {
15 gitweb = oldpkgs.gitweb.overrideAttrs(old: {
16 installPhase = old.installPhase + ''
17 cp -r ${./theme} $out/gitweb-theme;
18 '';
19 });
20 };
21
22 services.myWebsites.tools.modules = gitweb.apache.modules;
23 services.myWebsites.tools.vhostConfs.git = {
24 certName = "eldiron";
25 hosts = ["git.immae.eu" ];
26 root = gitweb.webRoot;
27 extraConfig = [ gitweb.apache.vhostConf ];
28 };
29 };
30 }