diff options
author | Valentin Gagarin <valentin.gagarin@tweag.io> | 2022-04-27 21:17:44 +0200 |
---|---|---|
committer | Valentin Gagarin <valentin.gagarin@tweag.io> | 2022-08-04 12:37:46 +0200 |
commit | 75981263912805a77890bcdb63c4aa3bbb0d8e09 (patch) | |
tree | f31d330d5f10473864b96b4000bb373abaf35a97 /doc/manual/src/design | |
parent | 34ea74c9ec21641399a96386094b021d7a2b30f4 (diff) |
remove separate meta-section, add architecture diagram
the diagram is a first approximation and only covers that same section.
of course there is much more going on, and other features should at some
point also be illustrated.
we also have to think about presentation format and technicalities
behind it. the manual has to render to `man`, but we may want something
more refined for web view.
Diffstat (limited to 'doc/manual/src/design')
-rw-r--r-- | doc/manual/src/design/design.md | 39 | ||||
-rw-r--r-- | doc/manual/src/design/overview.md | 20 | ||||
-rw-r--r-- | doc/manual/src/design/store/store.md | 2 |
3 files changed, 38 insertions, 23 deletions
diff --git a/doc/manual/src/design/design.md b/doc/manual/src/design/design.md index f5135bc9a..960a68f41 100644 --- a/doc/manual/src/design/design.md +++ b/doc/manual/src/design/design.md @@ -1,6 +1,41 @@ # Design and Data Model -Most of the manual is about how to use Nix. This chapter is about the technical principles behind Nix. -It describes each architectural layer and its components in its own section, starting at the bottom with the store layer, then working its way up to the user-facing components described in the rest of the manual. +## Architecture + +Nix consists of hierarchical [layers](https://en.m.wikipedia.org/wiki/Multitier_architecture#Layers). + +``` + [ commmand line interface ] + | + | evaluates + V + [ configuration language ] + | + | evaluates to + | + reference V build +[ build inputs ] --> [ build plans ] --> [ build results ] + \ | / + \ | persisted to / + \ V / + [ store ] +``` + +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 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 self-contained *build steps*, used to derive *build results* from referenced *build inputs*. + +::: {.note} +The Nix language itself does not have a notion of *packages* or *configurations*. +As far as we are concerned here, the inputs and results of a derivation are just data. +In practice this amounts to a set of files in a file system. +::: + +The command line and Nix language are what users interact with most. + +Underlying everything is the *Nix store*, a mechanism to keep track of build plans, data, and references between them. +It can also execute *build instructions*, captured in the build plans, to produce new data. + diff --git a/doc/manual/src/design/overview.md b/doc/manual/src/design/overview.md deleted file mode 100644 index b5f8b6aad..000000000 --- a/doc/manual/src/design/overview.md +++ /dev/null @@ -1,20 +0,0 @@ -# Overview - -Nix consists of layers that operate fairly independently. - -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 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 self-contained *build steps*, used to derive *build results* from referenced *build inputs*. - -::: {.note} -The Nix language itself does not have a notion of *packages* or *configurations*. -As far as we are concerned here, the inputs and results of a derivation are just data. -In practice this amounts to a set of files in a file system. -::: - -The command line and Nix language are what users interact with most. - -Underlying everything is the *Nix store*, a mechanism to keep track of build plans, data, and references between them. -It can also execute *build instructions*, captured in the build plans, to produce new data. - diff --git a/doc/manual/src/design/store/store.md b/doc/manual/src/design/store/store.md index 458c1e2b8..d4add52f5 100644 --- a/doc/manual/src/design/store/store.md +++ b/doc/manual/src/design/store/store.md @@ -1,4 +1,4 @@ -# Nix Store +# Store A Nix store is a collection of *store objects* referred to by *store paths*. Every store also has a "store directory path", which is a path prefix used for various purposes. |