params.globalConfig = determine_global_config() includeConfig params.globalConfig def determine_global_config() { if( System.getenv('NXF_GLOBAL_CONFIG') == null) { throw new Exception("Environment variable NXF_GLOBAL_CONFIG is missing. Set it to point to global.config file") } return System.getenv('NXF_GLOBAL_CONFIG') }