3
0
Fork 0
forked from mirrors/nixpkgs

nixos/gitolite: use group 'gitolite' instead of 'nogroup'

Having files (git repositories) owned by 'nogroup' is a bad idea.
This commit is contained in:
Bjørn Forsman 2017-09-12 11:31:29 +02:00
parent fc2c994991
commit 3a58e41e43
2 changed files with 11 additions and 1 deletions

View file

@ -426,7 +426,7 @@
teamspeak = 124; teamspeak = 124;
influxdb = 125; influxdb = 125;
nsd = 126; nsd = 126;
#gitolite = 127; # unused gitolite = 127;
znc = 128; znc = 128;
polipo = 129; polipo = 129;
mopidy = 130; mopidy = 130;

View file

@ -85,6 +85,14 @@ in
Gitolite user account. This is the username of the gitolite endpoint. Gitolite user account. This is the username of the gitolite endpoint.
''; '';
}; };
group = mkOption {
type = types.str;
default = "gitolite";
description = ''
Primary group of the Gitolite user account.
'';
};
}; };
}; };
@ -121,8 +129,10 @@ in
home = cfg.dataDir; home = cfg.dataDir;
createHome = true; createHome = true;
uid = config.ids.uids.gitolite; uid = config.ids.uids.gitolite;
group = cfg.group;
useDefaultShell = true; useDefaultShell = true;
}; };
users.extraGroups."${cfg.group}".gid = config.ids.gids.gitolite;
systemd.services."gitolite-init" = { systemd.services."gitolite-init" = {
description = "Gitolite initialization"; description = "Gitolite initialization";