It depends on how the config file in question is “exported”.
For xorg specifically, you can set services.xserver.exportConfiguration
to make the module link the config file into /etc/
and then access it via config.environment.etc."X11/xorg.conf".source
.