about summary refs log tree commit diff
path: root/modules/services/git-daemon.nix
blob: 5d027de0ee3c0e5a14e041de1047060ea8b25709 (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 = [
    ../../overlays/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 ];
  };
}