Skip to content

Commit

Permalink
nixos/gitolite: use group 'gitolite' instead of 'nogroup'
Browse files Browse the repository at this point in the history
Having files (git repositories) owned by 'nogroup' is a bad idea.
  • Loading branch information
bjornfor committed Sep 23, 2017
1 parent fc2c994 commit 3a58e41
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/misc/ids.nix
Expand Up @@ -426,7 +426,7 @@
teamspeak = 124;
influxdb = 125;
nsd = 126;
#gitolite = 127; # unused
gitolite = 127;
znc = 128;
polipo = 129;
mopidy = 130;
Expand Down
10 changes: 10 additions & 0 deletions nixos/modules/services/misc/gitolite.nix
Expand Up @@ -85,6 +85,14 @@ in
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.
'';
};
};
};

Expand Down Expand Up @@ -121,8 +129,10 @@ in
home = cfg.dataDir;
createHome = true;
uid = config.ids.uids.gitolite;
group = cfg.group;
useDefaultShell = true;
};
users.extraGroups."${cfg.group}".gid = config.ids.gids.gitolite;

systemd.services."gitolite-init" = {
description = "Gitolite initialization";
Expand Down

0 comments on commit 3a58e41

Please sign in to comment.