I came across to [1]. And I understand this may not be available in the near future; however I am still very curious. Do the nix team have any plans to support multiple instances?
I have similar requirement. My use case is I participate in several projects. Some of them share the same tech stacks, such as Kafka, Postgres, and so on. So they have issues such as port collision. Though there are workaround, it’d be nice if a user can purely use the nix env without docker.
Nonetheless, thank you for providing this amazing software.
While I’m by no means authorative on this, I doubt it. It’d take a lot of effort to rewrite all modules, it’d take a fair bit of effort to evaluate which can even support multiple simultaneous instances on one OS, and it’s impossible to do generically.
The modules are mostly maintained by volunteers, the modules that do support multiple instances usually do because it was the most natural way to write them; If you’re interested in making this happen for specific modules, you should probably make the changes and try to upstream them instead of hoping someone will step in.
Generally speaking NixOS modules which support multiple instances have more complicated code then modules which do not. In my opinion we should not rewrite modules to support multiple instances unless there is a large benefit to do so. I hope instead the module system can change in some way (like edolstra suggested several nixcons ago) to more naturally support multiple instances.
Do you have link to Edolstra’s talk? There are several links I find on the internet, it’s about Flakes. Is it the one you mentioned? Thank you for the input!