Not 100% sure becuase I don’t know you’re full environment, but tkinter sometimes requires an additional OS level install. I know Ubuntu requires something like “sudo apt install python3.10-tk”.
Not familiar with NixOS, but saw somethings mentioning “nix-env -i python3-tkinter”, but no idea if that’s a real command.
Sorry I missed that in the code block. I tried to dive a bit deeper, but it looks like there are different ways to build a python env in NixOS and the issues you’re running into could depend on your build process.
Found this documentation, but it’s a bit dense for me given my lack of experience with NixOS.
Best of luck though!