mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2025-12-31 02:35:01 +08:00
25 lines
754 B
Text
25 lines
754 B
Text
= 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]
|