mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-15 05:59:17 +03:00
Make nginx uid and gid optional.
This commit is contained in:
parent
7c8c1dade5
commit
76b7dea805
2 changed files with 9 additions and 3 deletions
|
@ -74,6 +74,7 @@ in
|
||||||
wwwrun = 54;
|
wwwrun = 54;
|
||||||
spamd = 56;
|
spamd = 56;
|
||||||
nslcd = 58;
|
nslcd = 58;
|
||||||
|
nginx = 60;
|
||||||
|
|
||||||
# When adding a uid, make sure it doesn't match an existing gid.
|
# When adding a uid, make sure it doesn't match an existing gid.
|
||||||
|
|
||||||
|
@ -131,6 +132,7 @@ in
|
||||||
networkmanager = 57;
|
networkmanager = 57;
|
||||||
nslcd = 58;
|
nslcd = 58;
|
||||||
scanner = 59;
|
scanner = 59;
|
||||||
|
nginx = 60;
|
||||||
|
|
||||||
# When adding a gid, make sure it doesn't match an existing uid.
|
# When adding a gid, make sure it doesn't match an existing uid.
|
||||||
|
|
||||||
|
|
|
@ -74,10 +74,14 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.extraUsers.nginx = {
|
users.extraUsers = optionalAttrs (cfg.user == "nginx") singleton
|
||||||
|
{ name = "nginx";
|
||||||
group = "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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue