nixos/git-daemon: only create git user if it will be used

This commit is contained in:
tilpner
2020-02-26 15:04:36 +01:00
parent bee470ef9a
commit 6df119a6ec
3 changed files with 67 additions and 2 deletions
@@ -104,14 +104,14 @@ in
config = mkIf cfg.enable {
users.users = optionalAttrs (cfg.user != "git") {
users.users = optionalAttrs (cfg.user == "git") {
git = {
uid = config.ids.uids.git;
description = "Git daemon user";
};
};
users.groups = optionalAttrs (cfg.group != "git") {
users.groups = optionalAttrs (cfg.group == "git") {
git.gid = config.ids.gids.git;
};