= Recipes This chapter provides examples of how to use Nix in a variety of scenarios. Multiple types of recipes are provided are provided for some scenarios; comparing the different recipes will help you better understand Nix. - _"Ad hoc" shells_ are useful when you want to quickly create an environment for a one-off task. - _Nix flakes_ are the recommended approach for development projects, including defining environments that you will use more than once. include::run/main-generated.adoc[leveloffset=+1] include::ad-hoc/main-generated.adoc[leveloffset=+1] include::shebang/main.adoc[leveloffset=+1] include::devshell/main.adoc[leveloffset=+1] include::build/main.adoc[leveloffset=+1] include::nix-shell/main-generated.adoc[leveloffset=+1]