The EDID override feature of the nvidia
driver seems to require specifying the monitor whose EDID should be overridden by the output ID.
You may have to somehow detect "where you are" before starting the X server, and then either switch your xorg.conf
file to one of two prepared alternatives, or add/remove a xorg.conf.d
snippet accordingly.
See this webpage for ideas: https://kodi.wiki/view/Creating_and_using_edid.bin_via_xorg.conf
You might be able to use the read-edid
and edid-decode
packages to read the actual EDID before the X server starts up, decode it to identify the display, then switch the X configuration file accordingly, then proceed with the X server start-up. Or you might use network parameters or something else you can readily detect before X start-up to determine which configuration should be used.
Since you haven't specified which Linux distribution you're using, I cannot suggest an exact procedure for inserting your custom script into the proper place in the system start-up sequence, but it is definitely possible to do it.