aboutsummaryrefslogtreecommitdiff
path: root/virtual/modules/gitweb/default.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-12 10:24:15 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-12 10:24:15 +0100
commit950ca5ee979ae2467f3471216140de2c1d572f4b (patch)
tree5fa7210645008d7fb03a0a5081066949bdfe35ad /virtual/modules/gitweb/default.nix
parent912921a74c8c67663048de66c6d11e1ae63dc10e (diff)
downloadNix-950ca5ee979ae2467f3471216140de2c1d572f4b.tar.gz
Nix-950ca5ee979ae2467f3471216140de2c1d572f4b.tar.zst
Nix-950ca5ee979ae2467f3471216140de2c1d572f4b.zip
Move httpd service to module
Diffstat (limited to 'virtual/modules/gitweb/default.nix')
-rw-r--r--virtual/modules/gitweb/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/virtual/modules/gitweb/default.nix b/virtual/modules/gitweb/default.nix
new file mode 100644
index 0000000..2a860ba
--- /dev/null
+++ b/virtual/modules/gitweb/default.nix
@@ -0,0 +1,30 @@
1{ lib, pkgs, config, mylibs, ... }:
2let
3 # FIXME: add buildbot
4 gitweb = pkgs.callPackage ./gitweb.nix { gitoliteDir = config.services.myGitolite.gitoliteDir; };
5 cfg = config.services.myGitweb;
6in {
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}