Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reword Nix conceptual overview #7

Merged
merged 6 commits into from
Apr 22, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions doc/manual/src/design/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@

Nix consists of layers that operate fairly independently.

At the top is the *command line interface*.
At the top is the *command line interface*, translating from invocations of Nix executables to interactions with the underlying layers.

Below that is the Nix *expression language*, in which packages and configurations are written.
Below that is the *Nix language*, a [purely functional programming](https://en.m.wikipedia.org/wiki/Purely_functional_programming) language.
It is used to compose expressions which ultimately evaluate to *derivations* — self-contained *build plans* to derive new data from referenced input data.
Ericson2314 marked this conversation as resolved.
Show resolved Hide resolved

The command line and expression language are what users interact with most.
::: {.note}
The Nix language itself does not have a notion of *packages* or *configurations*.
As far as we are concerned here, the result of a derivation is just data.
In practice this amounts to a set of files in a file system.
fricklerhandwerk marked this conversation as resolved.
Show resolved Hide resolved
:::

Below that is the *store layer*, Nix' machinery to represent tracked files, dependencies, and fully elaborated build plans.
It is also used for executing those build plans.
The store layer may not be as visible, but this is the heart of Nix.
The command line and Nix language are what users interact with most.

Underlying everything is the *Nix store*, a mechanism to keep track of derivations, data, and references between them.
It can also *realise derivations*, that is, *execute build instructions* to produce new data.
Ericson2314 marked this conversation as resolved.
Show resolved Hide resolved
It uses the file system as a persistence layer, and a database to keep track of references.
fricklerhandwerk marked this conversation as resolved.
Show resolved Hide resolved

This chapter describes Nix starting at the bottom with the store layer, working its way up to the user-facing components described in the rest of the manual.
fricklerhandwerk marked this conversation as resolved.
Show resolved Hide resolved

This chapter describes Nix starting with that bottom store layer, then working its way up until it reaches the more user-facing interfaces described in the rest of the manual."