about summary refs log tree commit diff
path: root/modules/services/git-daemon/default.nix
blob: 800cd3c37d2b162c643d02a6a13e328a13a6f79b (plain)
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
{ config, lib, ... }:

with lib;
let
  cfg = config.modules.services.gitDaemon;
in
{
  # TODO: uncouple with gitolite

  disabledModules = [
    "services/networking/git-daemon.nix"
  ];

  imports = [
    ./_git-daemon-module.nix
  ];

  options.modules.services.gitDaemon = {
    enable = mkEnableOption "git daemon";
  };

  config = mkIf cfg.enable {
    services.gitDaemon = {
      enable = true;
      createUserAndGroup = false;
      basePath = config.services.gitolite.dataDir + "/repositories";
    };

    networking.firewall.allowedTCPPorts = [ 9418 ];
  };
}