Flakes: Difference between revisions
imported>Artturin Replace input schema section with links |
imported>SjLambda Cleaned out introductory language, mostly style. |
||
Line 1: | Line 1: | ||
'''Nix flakes''' | '''Nix flakes''' is an [https://nixos.org/manual/nix/stable/contributing/experimental-features.html experimental feature] of the Nix package manager. | ||
== Introduction == | == Introduction == | ||
Flakes | Flakes is a feature of managing Nix packages to simplify usability and improve reproducibility of Nix installations. Flakes manages dependencies between Nix expressions, which are the primary protocols for specifying packages. Flakes implements these protocols in a consistent schema with a common set of policies for managing packages. | ||
* A [https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html#description flake] refers to a file-system tree whose root directory contains the Nix file specification called <code>flake.nix</code>. | |||
* An installation may contain any number of flakes, independent of each other or even call each other. | |||
* The contents of <code>flake.nix</code> file follow the uniform naming schema for expressing packages and dependencies on Nix. | |||
* Flakes use the standard Nix protocols, including the [https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#flake-references URL-like syntax] for specifying repositories and package names. | |||
* To simplify the long URL syntax with shorter names, [https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-registry.html flakes uses a registry] of symbolic identifiers. | |||
* Flakes also allow for locking references and versions that can then be easily queried and updated programmatically. | |||
* [https://nixos.org/manual/nix/stable/command-ref/new-cli/nix.html Nix command-line interface] accepts flake references for expressions that build, run, and deploy packages. | |||
* Flakes was introduced with Nix 2.4 ([https://nixos.org/manual/nix/unstable/release-notes/rl-2.4.html see release notes]). | |||
== Enable flakes == | == Enable flakes == |