I’m trying to use useradd command in the script, which will be running on NixOS. I was trying to call this binary this way:
${pkgs.useradd}/bin/useradd -m user
But this idea failed, because, there’s no such package. So I want to know, in which package, useradd binary goes included, to be able to call it in such way
${pkgs.packageContainingUseradd}/bin/useradd -m user
Yep. That’s a better practice in terms of NixOS. But in my particular case, it just simpler to create user imperatively, then trying to update .nix configs via script, using sed or awk