Is this in a live CD enviroenment, or in a freshly installed system? (if it is an installed system, was wifi working in a live CD env)?
I don’t know how to diagnose or verify if this is what happens here, but one problem I’ve run into previously was that the driver for my wifi adapter was proprietary, and thus wasn’t packaged into the default live CD environment. To fix this problem (again, can’t say if this is the problem here), you need to allowUnfree
in nixos settings, and you might need to explicitly add the relevant kernel module.
If you need to do this for a live CD env, you can build a custom live CD like this:
https://github.com/NixOS/nixpkgs/issues/15162#issuecomment-750821642