GDM monitor configuration

Hello,

Since /run/gdm is created from a blank slate on restart of the system, how could I make a local tweak so that GDM uses the same monitor configuration (scale and monitor arrangement, I have multiple monitors) as my user account?

On other Linux distributions, I would have done it by manually copying ~/.config/monitors.xml to the GDM home folder (/run/gdm on nixOS), but that obviously is a bit ugly and frowned upon.

I tried to see how I could override attributes on gdm.nix with overlays and overrideAttrs, but I was not successful (I wanted to add an environment.etc.“gdm/monitors.xml” block to dump my local monitors configuration into.

How can I make the least amount of changes (happy to create a little GDM fork), and get a nice 200% scale on GDM login screen as well as the right monitors being primary?

Ideally this would be exposed via some settings of the GDM module rather than hacks.

Thanks!