Generate /etc/passwd and /etc/group statically

Moved here from NixOS: https://github.com/NixOS/nixos/pull/168