In #1833516: Add a new top-level global for settings.php - move things out of $conf we added the new $settings array for storing largely static values that only live in settings.php and are generally needed very early in bootstrap, making them inappropriate for the config or state systems. However right now, there is no good way to get those values into settings.php other than manually adding them. This makes issues like upgrade path very difficult, as some of these values existed in the variable system in D7.
In order to make that easier we should add the ability to write these values into drupal_rewrite_settings(). I haven't looked at that function in too much depth so I'm not really sure how hard it is going to be to accomplish this.