Basically you use the application/bootstrap/start.php file to map a local host name to an environment key, and then you create key.file.php in your application/config directory, and don't check that file into your source control.

e.g. if you map "andrew" to "andrew-hostname.whatever", whenever you're running on andrews-hostname.whatever, andrew.database.php will be used for database config, instead of database.php.

I was trying to do almost the same thing.
You'll want to first make sure your host names are set up in /application/bootstrap/start.php. You might try PHP gethostname() to find your local host name, or, in your Shell, type: "hostname".

You can add as many hostnames to the arrays as you like - and as many environments as you like. Mine looks something like this: