You've got a chicken and egg problem. The geb.env property is read before the config script is executed so when you're setting it in GebConfig.groovy it's already too late for it to be effective. Another issue is that the config script should be just that, a passive config script, and not change the environment in any way.
There are two possible solutions I can think of:
- setting the environment variable in the IDE test run configuration, e.g. in IntelliJ: Run -> Edit configurations -> JUnit -> YourTestRunningConfiguration or Run -> Edit configurations -> Defaults -> JUnit
- moving configuration for whatever you want to be the default (chrome in your example) to the top level of the script, outside of the environments block - it will be used by default when geb.env system property is not set