{ pkgs, lib, config, ... }: let root = "/srv/git"; in { services = { gitolite = { enable = true; enableGitAnnex = true; dataDir = root; user = "git"; group = "git"; extraGitoliteRc = '' $RC{SITE_INFO} = 'a computer is a bicycle for the mind.'; ''; adminPubkey = lib.trivial.pipe ../Keys/Ben.pub [ builtins.readFile (lib.strings.splitString "\n") lib.lists.head ]; # TODO: this is broken # commonHooks = [ ./git-hooks ]; }; gitDaemon = { enable = true; basePath = "${root}/repositories"; repositories = map (p: "${root}/repositories/${p}") [ "nixpkgs.git" "ben/bin.git" "ben/cfg.git" ]; listenAddress = "simatime.com"; user = "gitDaemon"; group = "gitDaemon"; }; }; users.users = { gitDaemon = { #uid = config.ids.uids.gitDaemon; description = "Git daemon user"; extraGroups = [ "git" ]; }; }; users.groups = { gitDaemon = {}; }; }