You can merge them together, nix within docker gives you a cross platform system with magically pinned dependency from NixOS.
But pure Nix is another story, with a single nix-shell I have everything working everywhere nix run, and with the OS you can set-up deployments with no effort from a configuration file.
nix-shell
I have everything working everywhere nix run, and with the OS you can set-up deployments with no effort from a configuration file.