Write /etc/environment

Here's the magic we need for the next release.