<div dir="ltr"><div class="gmail_extra">I have done a walkthrough, and the only thing that I see special-cased is that sys.config has <a href="https://github.com/erlang/otp/blob/bf0d03bd6f393b6a4f7836c5203e9a83caf457e8/lib/kernel/src/application_controller.erl#L1821">hard-coded support</a> for nesting.</div><div class="gmail_extra"><br></div><div class="gmail_extra">One of the first things that the application master does when it starts is to check `init:get_argument(config)`, which simply lists all the files passed to `-config` files. The `init/2` function iterates that list and *If* the basename of one of items is "sys.config", then we enter that `if` branch. But the implementation does not assume its existence. In particular, it does not assume its existence regardless of whether the mode is interactive or embedded (which is said in the config docs).</div><div class="gmail_extra"><br></div><div class="gmail_extra">I confirmed with a sample release, changed the value of `-config` to point to a dummy foo.config, the system boots normally, and `init:get_arguments(config)` indeed returns</div><div class="gmail_extra"><br></div><div class="gmail_extra">    {:ok, [['/Users/fxn/tmp/sample/_build/prod/rel/sample/foo.config']]}</div><div class="gmail_extra"><br></div><div class="gmail_extra">So my conclusion is that it is really a convention (except for the fact that the documented nesting does not work in arbitrary config files).</div></div>