Don't tell them any sooner than you are required to. In the U.S., 2 weeks notice is typical, but not required. If your company would like 4 weeks, that is great - give them exactly that. This is not at all going to leave them "high and dry." It is plenty of time to arrange your work schedules, wrap up ongoing projects or bring coworkers up to speed on them, and possibly even allow them enough time to find your replacement. I repeat: 4 WEEKS IS PLENTY OF TIME.
Tell your boss that you've really loved working for them, but you're leaving to devote more time to your family. Let them know that you may be available for part time work for X number of weeks for the first month after you leave if you're feeling particularly generous, but it's absolutely not necessary to do more than the 4 week notice. And it should go without saying that you work your ass off in the notice period setting things up so your coworkers are totally on board with the what/where/how parts of your job.
It doesn't matter how close you and your boss are, if you tell them early, you are sending a clear message that you are not worth devoting more time and effort into advancing, and you'll probably build up some pretty great resentment with the boss and any coworkers that are aware of the time ticking down to your departure. You also could possibly be passed over for bonuses or perks that aren't expressly part of your employment contract/agreement, because bonus $ is usually for rewarding employees and seen as an incentive to stay with their company. If there are advancements/raises/cool and interesting projects... you probably won't be seeing much of any of those things if they know you're on your way out. They are for workers that are staying and devoted to the company. Why reward someone that is leaving when they could give those things to the workers that are going to be there long after you're gone and keep them happy?
I know many folks make friends and form lifelong attachments to coworkers, but you have to remember: this is your job, not a social venue, and your boss's loyalty and attention is first and foremost to the company - not you. Your first loyalty is to yourself and your own well-being. So protect your prospects for the coming year, and just go with the standard notice.