Is there much difference between using nix-shell and docker for local development?

I think the biggest difference between the two is that running a Dockerfile twice doesn’t guarantee you get the same development environment due to its imperative nature (most Dockerfiles start with an apt-get update) , whilst a shell.nix file guarantees that two runs of nix-shell at different times produce the exact same development environment due to the fact every dependency is finely tracked and pinned to a specific version.

I think there are many parallels between nix and docker. Both (try to) build images reliably, both have a distributed binary cache. Both package applications as the closure of their dependencies. Nix just does a better job at the reproducibility part.

I would also like to point out, that Nix can build docker containers (see the dockerTools section on the manual) which sort of gives you best of both worlds. You get the reproduciblity of Nix, and the wide options of deployment of Docker.