Use a custom install profile for Nightwatch tests?
As you understood it's been hardcoded. if you want to make it dynamic you can  create your custom parameter.

you can do it in a way like the following  : 

https://www.drupal.org/project/drupal/issues/3017176

this patch help you to know what you can do : https://www.drupal.org/files/issues/2019-11-11/3017176-16.patch