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

with lib;
let
  cfg = config.modules.services.gitDaemon;
in
{
  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 = "/var/lib/gitolite/repositories";
    };

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