How can I get my material Functions to work into paintable landscape materials?

I’m wondering how I can get my material functions to work with the landscape material so that they are paintable on my landscape.
I specifically want it to be materials and not just flat textures.
If anyone knows how to do this could you please point me in the right direction. I’m a bit lost.

Here is an example of my material function setup.
And my landscape material set up so far

You can do it like this:

It does seem like quite a long method so maybe there’s a better way