Power a 12V Solenoid and a RPi Zero with the Same Wall Socket
Power the entire circuit from a 12V wall adaptor with enough oomph to run the solenoid, the Pi, and everything else.

Then run the Pi itself from a 5V regulator that runs off of your 12V rail.