3
0
Fork 0
forked from mirrors/nixpkgs

Make nginx uid and gid optional.

This commit is contained in:
Russell O'Connor 2013-05-06 10:49:23 -04:00
parent 7c8c1dade5
commit 76b7dea805
2 changed files with 9 additions and 3 deletions

View file

@ -74,6 +74,7 @@ in
wwwrun = 54;
spamd = 56;
nslcd = 58;
nginx = 60;
# When adding a uid, make sure it doesn't match an existing gid.
@ -131,6 +132,7 @@ in
networkmanager = 57;
nslcd = 58;
scanner = 59;
nginx = 60;
# When adding a gid, make sure it doesn't match an existing uid.

View file

@ -74,10 +74,14 @@ in
};
};
users.extraUsers.nginx = {
users.extraUsers = optionalAttrs (cfg.user == "nginx") singleton
{ name = "nginx";
group = "nginx";
uid = config.ids.uids.nginx;
};
users.extraGroups.nginx = {};
users.extraGroups = optionalAttrs (cfg.group == "nginx") singleton
{ name = "nginx";
gid = config.ids.gids.nginx;
};
}