Yeah, declarativeness and sandboxing are almost orthogonal.
However, it is worth noting that Nix has pretty good sandboxing facilities.
Nevertheless, more tooling on this area would be welcome. It is still a bit behind Guix.