Hi,
You may have a look at this documentation here that have information on programming the config flash using NIOS:https://www.intel.com/content/www/us/en/docs/programmable/683118/current/overview-of-the-flash-programmer.html
We do not have a design example for Cyclone 10GX. But we do have an example design for CYCLONE V devkit and you could refer to the steps on using the GSFI IP with the NIOS II system: https://community.intel.com/cipcp26785/attachments/cipcp26785/fpga-wiki/926/1/Generic_Serial_Flash_Interface_design_example_quick_start_guide_final_updated.pdf
Hope this is helpful and let me know your feedback.
Thanks.
Kelly