Flakes: Difference between revisions
imported>Minion3665 Add rev and ref to git urls, as it's a useful thing that the schema doesn't mention |
imported>Jonringer Mention nixConfig as a top-level attribute in a flake |
||
| Line 67: | Line 67: | ||
The flake.nix file is a Nix file but that has special restrictions (more on that later). | The flake.nix file is a Nix file but that has special restrictions (more on that later). | ||
It has | It has 4 top-level attributes: | ||
* <code>description</code> is a string describing the flake. | * <code>description</code> is a string describing the flake. | ||
* <code>inputs</code> is an attribute set of all the dependencies of the flake. The schema is described below. | * <code>inputs</code> is an attribute set of all the dependencies of the flake. The schema is described below. | ||
* <code>outputs</code> is a function of one argument that takes an attribute set of all the realized inputs, and outputs another attribute set which schema is described below. | * <code>outputs</code> is a function of one argument that takes an attribute set of all the realized inputs, and outputs another attribute set which schema is described below. | ||
* <code>nixConfig</code> is an attribute set of values which reflect the values given to nix.conf. This can extend the normal behavior of a user's nix experience by adding flake-specific configuration, such as a binary cache. | |||
=== Input schema === | === Input schema === | ||