summaryrefslogtreecommitdiff
path: root/Biz/Cloud/Git.nix
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Cloud/Git.nix')
-rw-r--r--Biz/Cloud/Git.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/Biz/Cloud/Git.nix b/Biz/Cloud/Git.nix
index 4dde27f..fd7c8a2 100644
--- a/Biz/Cloud/Git.nix
+++ b/Biz/Cloud/Git.nix
@@ -10,8 +10,11 @@ in {
dataDir = root;
user = "git";
group = "git";
+ # the umask is necessary to give the git group read permissions, otherwise
+ # git-daemon et al can't access the repos
extraGitoliteRc = ''
$RC{SITE_INFO} = 'a computer is a bicycle for the mind.';
+ $RC{UMASK} = 0027;
'';
adminPubkey = lib.trivial.pipe ../Keys/Ben.pub [
builtins.readFile
@@ -24,22 +27,19 @@ in {
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";
};
};
+ # need to specify that these users can access git files by being part of the
+ # git group
users.users = {
gitDaemon = {
- #uid = config.ids.uids.gitDaemon;
description = "Git daemon user";
extraGroups = [ "git" ];
};
+ "nginx".extraGroups = [ "git" ];
};
users.groups = {
gitDaemon = {};