shell.nix-es can be curried (i.e., being called one after another) without any issues (that I'm aware of) so instead creating highly specific Nix expressions, create many smaller ones doing one task only that can be composed easier.
For example, there is the (Elixir-Phoenix-Postgres shell.nix)[https://github.com/toraritte/shell.nixes/blob/main/elixir-phoenix-postgres/shell.nix], my go-to Nix expression when trying to set PostgreSQL up quickly in other contexts. Spent a lot of time figuring out the PostgreSQL-specific parts - and it is mostly that anyway. Now I need to fire up a legacy Django project, but only need PostgreSQL, not the rest.
shell.nix-es can becurried(i.e., being called one after another) without any issues (that I'm aware of) so instead creating highly specific Nix expressions, create many smaller ones doing one task only that can be composed easier.For example, there is the (Elixir-Phoenix-Postgres
shell.nix)[https://github.com/toraritte/shell.nixes/blob/main/elixir-phoenix-postgres/shell.nix], my go-to Nix expression when trying to set PostgreSQL up quickly in other contexts. Spent a lot of time figuring out the PostgreSQL-specific parts - and it is mostly that anyway. Now I need to fire up a legacy Django project, but only need PostgreSQL, not the rest.