Hi Josue,
Let me first understand what you are trying to do:
You have initial conditions of an isolated disk galaxy, which contains gas in the disk and some collisionless component. So something you would be able to run with gadget right away. And what you need now some background medium, but somehow this impacts your gas initial conditions.
So the overall setup is similar to the ‘galaxy_merger_star_formation_3d’ example provided, right?

Could you let me know the Config.sh and param.txt settings?