I hope you don't have any neighbors within at least a half mile or so and have worked out the fields of fire in your place so you don't shoot your wife, kids, or dog due to a miss or over-penetration.   Unless you live in the middle of nowhere, a rifle, any rifle, but especially one with a small, high-speed projectile like a .223, is a terrible home defense weapon unless there's a herd of zombies coming down your street.   A pistol with enough stopping power to actually defend you has the same over-penetration problems.   A 12 gauge with 7 or 8 birdshot will kill an intruder just as dead at true self-defense distances as buckshot, a rifle, or a heavy pistol, and it won't destroy your house or kill your neighbors, family, or pets.