I had the same idea and posted a basic plan for the desk I built like that.
Keep in mind you need to have a support in the middle too aka this isn’t a totally finished plan, more like notes for what I added to my flat desk.
Adjust measurements to your desk as well.