Yep, I thought ChatGPT was trained on Github but it's generated precisely 0 correct .nix files for me to date.
I can believe that especially with nix - there isn't a defined way to do things. Most flakes out there will be done by newcomers learning and flakes is relative new e.g. 2020. The documentation of nix is bad.
SO ChatGPT3 had very little good stuff to learn from and later won't have much better.