is this even legal
Depends on the state, but states have the "castle" doctrine giving you the right to use deadly force when an intruder is inside your home.
Know this, however: if you are an adult male, the DA could, and probably will, look at the extent of force used, meaning that if there was a way to resolve the problem and protect your family without the use of deadly force but you decided to waste the dude for the hell of it, the DA could press charges. Not very likely in a southern state, but you never know when you'll run into an a-hole DA.
As general rule of thumb, you are not allowed to use deadly force to protect property alone.