It’s possible with a large overhang of a nearby roof or a smaller overhang with a slab. I used EPDM for the slab after problems with leaking .One other thing....
Hinged tops on nest boxes are virtually impossible to seal.
Consider having the rear of the nest box drop down to gather eggs.
But building new I would make the nest-boxes inside too with a easy acces door or vertical flap door, to gather the eggs from the outside.
You are right this solution with a lid on top of the nestboxes sucks. But I did manage to make it leak free. Stapling a piece of EPDM on top, of about 10” / 20 cm high and as wide + 2 “ on both sides as the nest boxes are.. Stapled 5” above the hinges and it covers the whole edge.. This did the trick for me.Our VERY WET winter here on the North Coast has shown us that no matter how much flashing, add-on coverings, etc. we've tried to keep water from seeping in, there's still a wet line in the coop bedding right under the lid's hinged top edge,
Also build an extension to the prefab coop with roosts and a poop board.