Create an environment with Ubuntu-like glibc

Hello,

I am trying to get a glibc that is as close as possible to the one on Ubuntu, the one on nix seems to be far more strict in many senses, making projects that compile fine on Ubuntu unable to compile with nix…
I don’t want to change the sources of my projects I just want to compile them on nix the same way I already am successfully on Ubuntu.
Could you please help me with any pointers as to how to do that ?
I am familiar with flakes and nix-shells.

Hello,

Can you be a bit more specific ? it is very difficult to give you some pointers given the amount of initial information provided.

Did you create a dev shell for each project? If not, start there.
Then you can set up direnv to automatically enter the shell when you enter the project directory.