Custom dnsmasq config on Balance router

I am using NextDNS and would like to load a custom dnsmasq config from them. It needs to pass in a special IP, along with the IP addresses of the DNS servers.

Is this possible? If not, is there another way to go about doing this?