Lift some env setting from jsmpereira