Generally? You don't.
The trend is away from this for software developer positions, unless you are willing to do contract work. There are several major things driving this right now:
(1) The employer doesn't have to allow it in order to be able to recruit talent, so they don't. A lot of managers engage in "management by walking around", and you are unlikely to get one of these types to sign off.
(2) Stacked ranking. If you're not in the office, and not "seen as being a strong contributor by your nominal coworkers, you'll get ranked poorly, and you will be the first person "PIP'ed" (Performance Improvement Program), and, if there are layoffs, you get to be near the top of the list.
(3) If they don't care where you are working from, be pretty sure that the job isn't going to be landing in a country with expensive labor, like the U.K., the U.S., and so on; if they are going to take on a remote worker, it's not going to be from your neck of the woods.
(4) Employer culture is considered important; if you want to have an employer, expect to come into the office so that they can culturally indoctrinate you. Yahoo laid off all their remote employees over this, and it's been the trend at Google, Apple, Facebook, Twitter, and so on. This is somewhat part and parcel with the stacked ranking, but it's the other side of the coin.