imports = [ ../secrets/keys/git.nix ];
users.extraUsers.git = {
- uid = 402;
+ uid = config.ids.uids.git;
isSystemUser = true;
home = "/home/git";
createHome = true;
shell = "${pkgs.git}/bin/git-shell";
};
- users.extraGroups.git = { gid = 402; };
+ users.extraGroups.git = { gid = config.ids.gids.git; };
services.nginx.gitweb = {
enable = true;
projectroot = "/home/git/repos";
};
+ services.gitDaemon = {
+ enable = true;
+ user = "git";
+ group = "git";
+ basePath = "/home/git/repos";
+ exportAll = true;
+ repositories = [ "/home/git/repos" ];
+ };
+
environment.systemPackages = [ new-repo ];
+
+ networking.firewall.allowedTCPPorts = [ 9418 ];
}