diff options
Diffstat (limited to 'Biz/Cloud/Git.nix')
-rw-r--r-- | Biz/Cloud/Git.nix | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/Biz/Cloud/Git.nix b/Biz/Cloud/Git.nix index b35b126..4dde27f 100644 --- a/Biz/Cloud/Git.nix +++ b/Biz/Cloud/Git.nix @@ -1,11 +1,13 @@ -{ pkgs, lib, ... }: +{ pkgs, lib, config, ... }: -{ +let + root = "/srv/git"; +in { services = { gitolite = { enable = true; enableGitAnnex = true; - dataDir = "/srv/git"; + dataDir = root; user = "git"; group = "git"; extraGitoliteRc = '' @@ -16,6 +18,30 @@ (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 = {}; }; } |