That introduces a dependence on the registry which is strictly worse.
In any case the flake input isn’t the issue, if you can’t reach cache.nixos.org then either you have a network issue or Fastly’s CDN PoP is unreachable for you. It seems to be a problem particularly for users based in Asia. You can try the TUNA mirror as a workaround in that case.