Use a level to draw a line in the back of the closet 1/2" below where you want the final desk top to be. Mark where all the studs are along this line.
Build a frame from 2x2 boards in the closet. Use pocket holes to attach the frame to each other and secure it to the wall into studs with 3" screws.
Add a 2x2 board to the front between the side boards with pocket hole screws. Then add 2 center supports by attaching a 2x2 in the center between the front and back.
Cut the plywood to fit the top of the frame. Secure with wood glue and finishing nails. Cut the 1x3 to cover the front of the plywood and frame. Attach with wood glue and finishing nails.
Stain your desk top. I used a natural stain combination of coffee and vinegar soaked with steel wool. Then seal it with 3 coats of polyurethane.
Lastly, drill a hole at the back of the desk to run cords through. You can cover the hole with a cord plug if desired.
A perfect office that doesn't take up valuable floor space.