The network configuration settings specified in the configuration.nix file should, under normal circumstances, function properly without requiring additional modifications.
I don’t think that’s what @geor is asking, they’re asking if there’s a way to declaratively configure individual wifi configurations. I have the same need for my school wifi, and I also wasn’t able to find a specific module for this kind of file, and had to use the environment.etc.<name>.text option as offered as an alternative.
Note that if you use Nix to create the nmconnection files, they end up in the Nix store, including the passphrases. I would generally aim for keeping secrets out of the store. Erase your darlings: immutable infrastructure for mutable systems - Graham Christensen comes to mind - Graham just copies the files to a persistent location and uses Nix only to create symlinks to that location.