What is automatic about docker? Do you mean other people have already put in the work? Or do you mean that it's more trivial to pip/npm/cargo install stuff?
Where Debian/PIP/NPM/Cargo already do work.
Nix as an instruction set, no, you still have to declare what you want, same as a dockerfile.
it's just... Docker will do what a shell script will.
Nix is like hoping someone's done the upstream finagling to get your particular dependencies happy.