However, when I’m deploying it to a server, the error occurs stating that:
warning: variable "some_var" does not exist and is being expanded to "some_var()", please use parentheses to remove the ambiguity or change the variable name
** (Mix.Config.LoadError) could not load config config/prod.exs
** (CompileError) config/prod.exs:4: undefined function some_var/0
In fact sometimes it would be useful to be able to access previous config values in further configs. For example with Nerves, I ran into a situation where I was setting a list in the configuration and a further config would have added to that list. Copying the whole list to the second place makes it worse to maintain.
As I see your use case here is an idea. Untested and maybe syntactically wrong.
It seems the only thing that needs configured is some_var = "my_var". The rest of the keys are derived from it. My guess is that there must be some default value for it since you seek to use your own config file. Based on that you can create a module that provides the calculated values and use the functions instead of variables.