{ 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 ]; }; }