Both. Find a way.
If you could afford it, a pistol caliber carbine in 9mm should be considered. Ruger makes a 9mm rifle that is based on the tried and true Ruger 10/22 design. It will take cheap Glock 9mm magazines. (A major plus - proprietary mags are expensive). It would be an excellent self defense rifle in home and out to 150 yard. You could later get a 9mm pistol. The combo would use the same ammo so you only have to worry about stocking up on one caliber. Also 9mm ammo is probably to most common plentiful round in the world. A very solid choice for both everyday practical use and survival. If I was just starting out with firearms, that would be my choice.