From 950ca5ee979ae2467f3471216140de2c1d572f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 12 Jan 2019 10:24:15 +0100 Subject: Move httpd service to module --- virtual/modules/gitweb/default.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 virtual/modules/gitweb/default.nix (limited to 'virtual/modules/gitweb/default.nix') 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 @@ +{ lib, pkgs, config, mylibs, ... }: +let + # FIXME: add buildbot + gitweb = pkgs.callPackage ./gitweb.nix { gitoliteDir = config.services.myGitolite.gitoliteDir; }; + cfg = config.services.myGitweb; +in { + options.services.myGitweb = { + enable = lib.mkEnableOption "my gitweb service"; + }; + + config = lib.mkIf cfg.enable { + security.acme.certs."eldiron".extraDomains."git.immae.eu" = null; + + nixpkgs.config.packageOverrides = oldpkgs: rec { + gitweb = oldpkgs.gitweb.overrideAttrs(old: { + installPhase = old.installPhase + '' + cp -r ${./theme} $out/gitweb-theme; + ''; + }); + }; + + services.myWebsites.tools.modules = gitweb.apache.modules; + services.myWebsites.tools.vhostConfs.git = { + certName = "eldiron"; + hosts = ["git.immae.eu" ]; + root = gitweb.webRoot; + extraConfig = [ gitweb.apache.vhostConf ]; + }; + }; +} -- cgit v1.2.3