Of course, that means you need to run NixOS for that to work (which I also do everywhere) and there are networking problems with Docker/Podman in NixOS you need to address yourself. Whereas Docker "runs anywhere" these days.
Worth noting the tradeoffs, but I agree using Nix for this makes life more pleasant and easy to maintain.