NixOS config conversion help

It seems that it can be declared as followed:
https://search.nixos.org/options?channel=24.05&from=0&size=50&sort=relevance&type=packages&query=ipv4.routes.

Some posts that may help: