At my last couple of jobs, I actually redlined the employment agreement and put an addendum that said that anything I work on away from work on my own hardware is mine. They all accepted it, sometimes with a little back and forth (and in one case three years in came back to me saying "we don't have your employment agreement" and starting the process over again).
There was only one place I didn't have to do that -- Netflix. It's part of their standard agreement. It even went one step further and said that even if you use their resources, if you do it on your own time you own it, as long as it's not in direct competition with their business. It was a refreshing change for sure.