Technically, I think they CAN tell you how far away you’re allowed to live. Some public jobs require living in a given city or county, so it is legal. I don’t thing most employers will tell employees explicitly where to live, but they may put pressure on if commute times interfere with timely arrival at work, etc.