Commit graph

2359 commits

Author SHA1 Message Date
Valentin Gagarin
d460dbdd30 be more precise about substituting store derivations
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-08-31 21:26:46 +02:00
Valentin Gagarin
6b3320ab05 mention remote builders
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-08-31 21:26:44 +02:00
Valentin Gagarin
0cd8f36644 add anchor to builder 2023-08-31 21:26:15 +02:00
Valentin Gagarin
d50f116421 add reference link 2023-08-31 21:25:39 +02:00
Valentin Gagarin
b7e9e29605 remove abstract description 2023-08-31 21:25:39 +02:00
Valentin Gagarin
a57e0e8c5c reword introductory sentence 2023-08-31 21:25:39 +02:00
Valentin Gagarin
315a11bcc9 remove superfluous word 2023-08-31 21:25:39 +02:00
Valentin Gagarin
1bc9257d7c reword description of how realisation works 2023-08-31 21:25:39 +02:00
Cole Helbling
46478b44ff
docs/testing: point out the existence of GTEST_FILTER (#8883) 2023-08-29 22:13:35 +00:00
Eelco Dolstra
5b5f56a9d4
Merge pull request #8859 from edolstra/tarball-last-modified
Tarball trees: Propagate lastModified
2023-08-29 17:02:06 +02:00
Eelco Dolstra
56763ff918 Document that redirected tarball flakerefs can specify lastModified 2023-08-29 16:08:29 +02:00
Silvan Mosberger
151120a1ae
Document nix-prefetch-url defaults (#8878) 2023-08-28 22:14:01 +02:00
Valentin Gagarin
880fef9cdf do not change existing release notes 2023-08-28 20:52:30 +02:00
tomberek
b563ef38cc
Merge pull request #8819 from VertexA115/fix/deep-follow-paths
Fix follow path checking at depths greater than 2
2023-08-25 10:33:05 -04:00
Guillaume Girol
925a444b92 add nix-store --query --valid-derivers command
notably useful when nix-store --query --deriver returns a non-existing
path.

Co-authored-by: Felix Uhl <iFreilicht@users.noreply.github.com>
2023-08-24 11:37:24 +02:00
Valentin Gagarin
d5b130ef13 glossary: dedent list and do not use forced line breaks
this makes it slightly easier to work with and consistent with all the
other markdown lists in use
2023-08-24 10:00:17 +02:00
Uri Zafrir
4a435ad228
Add introductory sentence to advanced topics (#8861) 2023-08-23 15:18:25 +00:00
Tom Bereknyei
c609be4072 doc: explain the . attrPath prefix notation 2023-08-19 17:19:52 -04:00
Alex Zero
37a509ca2d Add release notes for the previous commit 2023-08-14 18:56:02 +01:00
John Ericson
44c8d83831 Create outputOf primop.
In the Nix language, given a drv path, we should be able to construct
another string referencing to one of its output. We can do this today
with `(import drvPath).output`, but this only works for derivations we
already have.

With dynamic derivations, however, that doesn't work well because the
`drvPath` isn't yet built: importing it like would need to trigger IFD,
when the whole point of this feature is to do "dynamic build graph"
without IFD!

Instead, what we want to do is create a placeholder value with the right
string context to refer to the output of the as-yet unbuilt derivation.
A new primop in the language, analogous to `builtins.placeholder` can be
used to create one. This will achieve all the right properties. The
placeholder machinery also will match out the `outPath` attribute for CA
derivations works.

In 60b7121d2c we added that type of
placeholder, and the derived path and string holder changes necessary to
support it. Then in the previous commit we cleaned up the code
(inspiration finally hit me!) to deduplicate the code and expose exactly
what we need. Now, we can wire up the primop trivally!

Part of RFC 92: dynamic derivations (tracking issue #6316)

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-08-14 09:37:37 -04:00
John Ericson
60b7121d2c Make the Derived Path family of types inductive for dynamic derivations
We want to be able to write down `foo.drv^bar.drv^baz`:
`foo.drv^bar.drv` is the dynamic derivation (since it is itself a
derivation output, `bar.drv` from `foo.drv`).

To that end, we create `Single{Derivation,BuiltPath}` types, that are
very similar except instead of having multiple outputs (in a set or
map), they have a single one. This is for everything to the left of the
rightmost `^`.

`NixStringContextElem` has an analogous change, and now can reuse
`SingleDerivedPath` at the top level. In fact, if we ever get rid of
`DrvDeep`, `NixStringContextElem` could be replaced with
`SingleDerivedPath` entirely!

Important note: some JSON formats have changed.

We already can *produce* dynamic derivations, but we can't refer to them
directly. Today, we can merely express building or example at the top
imperatively over time by building `foo.drv^bar.drv`, and then with a
second nix invocation doing `<result-from-first>^baz`, but this is not
declarative. The ethos of Nix of being able to write down the full plan
everything you want to do, and then execute than plan with a single
command, and for that we need the new inductive form of these types.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-08-10 00:08:32 -04:00
Théophane Hufschmitt
ad410abbe0 Stabilize discard-references
It has been there for a few releases now (landed in 2.14.0), doesn't
seem to cause any major issue and is wanted in a few places
(https://github.com/NixOS/nix/pull/7087#issuecomment-1544471346).
2023-08-07 16:53:37 +02:00
John Ericson
9113b4252b
Merge pull request #8760 from iFreilicht/fix-json-load-assertion-errors
Fix derivation load assertion errors
2023-08-06 17:07:43 -07:00
Felix Uhl
3fefc2b284 Fix derivation load assertion errors
When loading a derivation from a JSON, malformed input would trigger
cryptic "assertion failed" errors. Simply replacing calls to `operator []`
with calls to `.at()` was not enough, as this would cause json.execptions
to be printed verbatim.

Display nice error messages instead and give some indication where the
error happened.

*Before:*

```
$ echo 4 | nix derivation add
error: [json.exception.type_error.305] cannot use operator[] with a string argument with number

$ nix derivation show nixpkgs#hello | nix derivation add
Assertion failed: (it != m_value.object->end()), function operator[], file /nix/store/8h9pxgq1776ns6qi5arx08ifgnhmgl22-nlohmann_json-3.11.2/include/nlohmann/json.hpp, line 2135.

$ nix derivation show nixpkgs#hello | jq '.[] | .name = 5' | nix derivation add
error: [json.exception.type_error.302] type must be string, but is object

$ nix derivation show nixpkgs#hello | jq '.[] | .outputs = { out: "/nix/store/8j3f8j-hello" }' | nix derivation add
error: [json.exception.type_error.302] type must be object, but is string

```

*After:*

```
$ echo 4 | nix derivation add
error: Expected JSON of derivation to be of type 'object', but it is of type 'number'

$ nix derivation show nixpkgs#hello | nix derivation add
error: Expected JSON object to contain key 'name' but it doesn't

$ nix derivation show nixpkgs#hello | jq '.[] | .name = 5' | nix derivation add
error: Expected JSON value to be of type 'string' but it is of type 'number'

$ nix derivation show nixpkgs#hello | jq '.[] | .outputs = { out: "/nix/store/8j3f8j-hello" }' | nix derivation add
error:
       … while reading key 'outputs'

       error: Expected JSON value to be of type 'object' but it is of type 'string'
```
2023-08-05 01:34:30 +02:00
John Ericson
3b592c880a Add infra for experimental store implemenations
This is analogous to that for experimental settings and flags that we
have also added as of late.
2023-08-02 15:46:38 -04:00
Robert Hensing
33d58a90c2 toJSON: Add attribute path to trace 2023-07-31 13:02:54 +02:00
Alex Ameen
2d1d81114d
Add parseFlakeRef and flakeRefToString builtins (#8670)
Over the last year or so I've run into several use cases where I need to
parse and/or serialize URLs for use by `builtins.fetchTree` or
`builtins.getFlake`, largely in order to produce _lockfile-like_ files
for lang2nix frameworks or tools which use `nix` internally to drive
builds.

I've gone through the painstaking process of emulating
`nix::FlakeRef::fromAttrs` and `nix::parseFlakeRef` several times with
mixed success; but these are difficult to create and even harder to
maintain if I hope to stay aligned with changes to the real
parser/serializer.

I understand why adding new `builtins` isn't something we want to do
flagrantly. I'm recommending this addition simply because I keep
encountering use cases where I need to parse/serialize these URIs in
`nix` expressions, and I want a reliable solution.

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
Co-authored-by: John Ericson <git@JohnEricson.me>
2023-07-25 17:43:33 +00:00
Naïm Favier
1b756e300f
doc: clarify release notes about nested attribute merges 2023-07-25 16:09:56 +02:00
Eelco Dolstra
c51be0345e Release notes 2023-07-24 17:19:31 +02:00
Naïm Favier
570a1a3ad7
parser: merge nested dynamic attributes
Fixes https://github.com/NixOS/nix/issues/7115
2023-07-21 17:14:03 +02:00
Valentin Gagarin
85d0eb6316
fix broken links (#8722) 2023-07-20 17:58:14 +02:00
Valentin Gagarin
0e4f6dfcf7 revert anchor prefix for builtin constants
the original change broke many pre-existing anchor links.

also change formatting of the constants listing slightly:
- the type should not be part of the anchor
- add highlight to the "impure only" note
2023-07-20 10:27:38 +02:00
John Ericson
453c4be93c
Merge pull request #8680 from NixLayeredStore/test-groups
Introduce notion of a test group, use for CA tests
2023-07-19 11:17:57 -04:00
Valentin Gagarin
b0173716f6
clarify wording on args@ default handling (#8596)
* clarify wording on args@ default handling

Most importantly use shorter sentences and emphasize the key point that defaults aren't taken into account

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: John Ericson <git@JohnEricson.me>
2023-07-19 13:07:07 +00:00
Robert Hensing
32494cbb29
Merge pull request #7973 from fricklerhandwerk/remove-channels
remove the Channels section
2023-07-19 14:02:26 +02:00
Valentin Gagarin
2fa90e5824 add more details on CA derivations 2023-07-19 13:59:18 +02:00
Valentin Gagarin
5f37ebcf83 document all special system features and their behavior 2023-07-19 13:34:03 +02:00
Valentin Gagarin
6c3cd429a6 fix broken links 2023-07-19 11:01:48 +02:00
Valentin Gagarin
1a220bed93 do not mention output attributes
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-07-19 10:38:12 +02:00
Valentin Gagarin
c8f04e2024 note that naming convention is from Autotools
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-07-19 10:37:40 +02:00
Valentin Gagarin
4944e37ec0 expand on the system type in hacking guide 2023-07-19 10:37:40 +02:00
Valentin Gagarin
e14c8a359e list moving parts of channels 2023-07-19 10:26:25 +02:00
Valentin Gagarin
4bab5a6208 revert channel files overview 2023-07-19 09:42:53 +02:00
Valentin Gagarin
cd0e39bd89 remove redundant information from channel profile description 2023-07-19 09:39:04 +02:00
Valentin Gagarin
ee72ede389 remove the Channels section
this is a how-to guide which should not be in the reference manual.
it also refers to `nix-env`, which should not be the first thing readers
of the reference manual encounter, as it behaves very differently in
spirit from the rest of Nix.

slightly reword the documentation to be more concise and informative.
2023-07-19 09:39:04 +02:00
John Ericson
259e328de8 Introduce notion of a test group, use for CA tests
Grouping our tests should make it easier to understand the intent than
one long poorly-arranged list. It also is convenient for running just
the tests for a specific component when working on that component.

We need at least one test group so this isn't dead code; I decided to
collect the tests for the `ca-derivations` and `dynamic-derivations`
experimental features in groups. Do
```bash
make ca.test-group -jN
```
and
```bash
make dyn-drv.test-group -jN
```
to try running just them.

I originally did this as part of #8397 for being able to just the local
overlay store alone. I am PRing it separately now so we can separate
general infra from new features.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-07-18 09:31:13 -04:00
Sinan Mohd
a5c88f8609
Nix Reference Manual: keep nix expressions uptodate with nixpkgs (#8703) 2023-07-16 09:25:11 +00:00
Mathnerd314
c70484454f Expanded test suite
* Lang now verifies errors and parse output

* Some new miscellaneous tests

* Easy way to update the tests

* Document workflow in manual

* Use `!` not `~` as separater char for sed

  It is confusing to use `~` when we are talking about paths and home
  directories!

* Test test suite itself (`test/lang-test/infra.sh`)

Additionally, run shellcheck on `tests/lang.sh` to help ensure it is
correct, now that is is more complex.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-07-11 21:43:09 -04:00
Robert Hensing
40052c7613 fetchClosure: Docs and error message improvements
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-06-30 18:23:42 +02:00
Robert Hensing
50de11d662 doc: Improve fetchClosure documentation 2023-06-30 18:23:24 +02:00
Robert Hensing
32c69e2b17 doc: Typo 2023-06-30 18:22:47 +02:00
Eelco Dolstra
a0c617348b
Merge pull request #8589 from jfroche/sign-paths-as-allowed-user
Allow to sign path as unprivileged user
2023-06-30 13:13:42 +02:00
John Ericson
ca49e13414 Split testing into its own page in the contribution guide
`hacking.md` has gotten really big!
2023-06-27 18:27:49 -04:00
John Ericson
2ccc02515f Trailing commas in redirects
This avoids diff noise when more are added. Unlike with JSON, this is
allowed in JS.
2023-06-27 18:23:06 -04:00
Jean-François Roche
80c9259756 Allow to sign path as unprivileged user
User can now sign path as unprivileged/allowed user

refs #1708
2023-06-27 18:31:31 +02:00
John Ericson
22b278e011 Automatically document builtin constants
This is done in roughly the same way builtin functions are documented.

Also auto-link experimental features for primops, subsuming PR #8371.

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-06-27 09:37:54 -04:00
John Ericson
d40f0e534d Don't say this when we still pollute the global scope
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-06-27 09:37:31 -04:00
John Ericson
4da7c86618 Switch example to a primop this is less ill-advised
Any primop will do for this, so might as well use one that isn't impure.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-06-27 09:34:36 -04:00
John Ericson
97df060588 Better document build failure exit codes
- Improved API docs from comment

- Exit codes are for `nix-build`, not just `nix-store --release`

- Make note in tests so the magic numbers are not surprising

Picking up where #8387 left off.
2023-06-22 14:29:45 -04:00
John Ericson
78e1e3c753
Merge pull request #8565 from obsidiansystems/profile-delete-docs
Clarify docs on deleting generations, including fixing a mistake
2023-06-22 10:27:40 -04:00
Valentin Gagarin
0ab962d83f
Merge pull request #8556 from fricklerhandwerk/hacking-headings
hacking guide: use more self-descriptive section headings
2023-06-22 13:45:31 +02:00
John Ericson
5cc22e3370 Clarify docs on deleting generations, including fixing a mistake
Deleting store info corrected (there is a foot-gun in Nix with
`--delete-generations old`!)

Also a few things are cleaned up based on feedback.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2023-06-21 20:05:41 -04:00
Valentin Gagarin
5f9a921bc1
do not use "target", as it's a loaded term in the domain of compilers
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-06-21 14:31:09 +02:00
Valentin Gagarin
085104944b add redirects to changed anchors 2023-06-21 09:46:23 +02:00
Valentin Gagarin
a78f929065 fix anchor link 2023-06-21 09:43:22 +02:00
Valentin Gagarin
71317162c5 use more self-descriptive section headings 2023-06-20 13:44:43 +02:00
Valentin Gagarin
3c618c43c6
Merge pull request #8532 from fricklerhandwerk/nix.conf-sections
split nix.conf man page into sections
2023-06-20 13:16:14 +02:00
Valentin Gagarin
68c6219343 clarify setting options on the command line 2023-06-20 12:13:32 +02:00
Valentin Gagarin
bc7324e912 clarify read order for configuration settings 2023-06-20 12:13:26 +02:00
fricklerhandwerk
38bd1cc9bc split configuration file page into sections
this makes it easier to scan for specific information, such as the
format of command line flags
2023-06-20 12:11:01 +02:00
fricklerhandwerk
f2b54e3b71 add links to environment variables documentation 2023-06-20 12:11:01 +02:00
Travis A. Everett
33d3889831 redirect old platform uninstall instruction links
Uninstall instructions were moved to their own page in #8267. The
overall section link was redirected in #8286, but platform-specific
links (which I give out frequently when I triage installer trouble)
weren't included.
2023-06-19 15:17:50 -05:00
Silvan Mosberger
3910430b9d
Add more links in nix-build documentation (#8545)
* Add more links in nix-build documentation


Co-authored-by: John Ericson <git@JohnEricson.me>
2023-06-19 21:00:49 +02:00
John Ericson
469d06f9bc Split out worker protocol template definitions from declarations
This is generally a fine practice: Putting implementations in headers
makes them harder to read and slows compilation. Unfortunately it is
necessary for templates, but we can ameliorate that by putting them in a
separate header. Only files which need to instantiate those templates
will need to include the header with the implementation; the rest can
just include the declaration.

This is now documenting in the contributing guide.

Also, it just happens that these polymorphic serializers are the
protocol agnostic ones. (Worker and serve protocol have the same logic
for these container types.) This means by doing this general template
cleanup, we are also getting a head start on better indicating which
code is protocol-specific and which code is shared between protocols.
2023-06-19 11:45:59 -04:00
Valentin Gagarin
7bf17f8825
Add description for file system objects (#8500)
While this is not actually a notion in the implementation, it is
explicitly described in the thesis and quite important for understanding
how the store works.

Co-authored-by: John Ericson <git@JohnEricson.me>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-06-18 23:45:08 -04:00
John Ericson
60d81b5163
Merge pull request #8472 from NixOS/nix-language-purpose
Refine wording on the purpose of the Nix language
2023-06-18 23:38:05 -04:00
Christina Sørensen
741f7837f8
Fix wikipedia links (#8533) 2023-06-17 09:06:17 +00:00
Eelco Dolstra
e503eadafc
Merge pull request #8477 from edolstra/tarball-flake-redirects
Tarball flake improvements
2023-06-16 18:03:50 +02:00
Eelco Dolstra
b1ed9b4b0c
Apply suggestions from code review
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-06-16 16:48:37 +02:00
Eelco Dolstra
cab03fb779 Add docs 2023-06-16 15:58:42 +02:00
Valentin Gagarin
c3c4076342 make domain-specificity more specific
also slightly reword the purpose statement to introduce (and explain)
derivations right away.
2023-06-15 03:08:07 +02:00
John Ericson
946cd9e3f9
Merge pull request #8351 from obsidiansystems/delete-profiles-tests-docs
Expanding tests and docs relating to deleting profiles
2023-06-15 01:47:21 +02:00
John Ericson
5b7e285727 Improve nix-collect-garbage docs
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-06-14 19:01:08 -04:00
John Ericson
b55f26c65f Improve nix-env --delete-generations docs
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-06-14 19:01:08 -04:00
Valentin Gagarin
a1cf16563f
Fixup description of substituters (#8291)
Introduce what substituters "are" in the configuration option entry.
Remove arbitrary line breaks for easier editing in the future.
Link glossary some more.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: John Ericson <git@JohnEricson.me>
2023-06-14 20:49:58 +00:00
John Ericson
37bffbc28f
Merge pull request #8488 from Mic92/update-requirements
nix actually needs c++20 now
2023-06-14 20:37:52 +02:00
John Ericson
ff905cb796
Merge pull request #4803 from ShamrockLee/nix-channel-list-generations
Add `nix-channel --list-generations`
2023-06-14 18:30:35 +02:00
Jörg Thalheim
c51f3f1eb2 nix actually needs c++20 now 2023-06-10 13:56:05 +02:00
Valentin Gagarin
db680e0e57
refine wording on the purpose of the Nix language
packages and configurations are not really a concept in Nix or the Nix language. the idea of transforming files into other files clearly captures what it's all about, and the new phrasing should make the term "derivation" more obvious both in terms of meaning and origin.
2023-06-08 02:00:05 +02:00
Théophane Hufschmitt
527eb4a99a
Merge pull request #8317 from fricklerhandwerk/doc-identifier
document identifier syntax for attribute sets
2023-06-02 13:10:27 +02:00
Théophane Hufschmitt
331f0967c4 Add a release note for nix-channel --list-generations 2023-06-02 10:14:53 +02:00
Shamrock Lee
b292177eec Add nix-channel --list-generations
Add support to --list-generations
as another way to say
nix-env --profile /nix/var/nix/profiles/per-user/$USER/channels --list-generations
the way we did for nix-channel --rollback [generation id]
2023-06-02 10:12:35 +02:00
Eelco Dolstra
008f89fa50 Typo 2023-05-31 14:05:00 +02:00
Eelco Dolstra
afc24e6a66 Release notes 2023-05-31 12:38:05 +02:00
Eelco Dolstra
9a5b9c588f
Merge pull request #8421 from fricklerhandwerk/doc-replaceStrings
update documentation according to release notes
2023-05-31 12:10:32 +02:00
Valentin Gagarin
738c0d5064
Merge pull request #8318 from fricklerhandwerk/doc-currentTime
document `builtins.currentTime`
2023-05-31 03:15:54 +02:00
Valentin Gagarin
52004696c0
Merge pull request #8413 from doronbehar/doc/distributed-builds/clearer-warning
distributed-builds.md: Clarify warning ssh access requirements
2023-05-31 02:05:05 +02:00
Valentin Gagarin
e2f33e0df1 rewrap lines to use one line per sentence
this makes future reviews easier as it reduces diff noise
2023-05-31 01:32:03 +02:00
Doron Behar
76287a9207 distributed-builds.md: Clarify warning ssh access requirements 2023-05-31 01:28:15 +02:00
Valentin Gagarin
7a5731aa07 link to mentioned builtin 2023-05-30 22:58:00 +02:00
polykernel
a382919d7d
primops: lazy evaluation of replaceStrings replacements
The primop `builtins.replaceStrings` currently always strictly evaluates the
replacement strings, however time and space are wasted for their computation
if the corresponding pattern do not occur in the input string. This commit
makes the evaluation of the replacement strings lazy by deferring their
evaluation to when the corresponding pattern are matched and memoize the result
for efficient retrieval on subsequent matches.

The testcases for replaceStrings was updated to check for lazy evaluation
of the replacements. A note was also added in the release notes to
document the behavior change.
2023-05-25 18:35:23 -04:00
Bernardo Meurer
bf693319f6
feat: add always-allow-substitutes
This adds a new configuration option to Nix, `always-allow-substitutes`,
whose effect is simple: it causes the `allowSubstitutes` attribute in
derivations to be ignored, and for substituters to always be used.

This is extremely valuable for users of Nix in CI, where usually
`nix-build-uncached` is used. There, derivations which disallow
substitutes cause headaches as the inputs for building already-cached
derivations need to be fetched to spuriously rebuild some simple text
file.

This option should be a good middle-ground, since it doesn't imply
rebuilding the world, such as the approach I took in
https://github.com/NixOS/nixpkgs/pull/221048
2023-05-22 19:42:29 +01:00
John Ericson
684e9be8b9
Merge pull request #8337 from fricklerhandwerk/channel-files
list files used by `nix-channel` on its own man page
2023-05-17 12:21:20 -04:00
John Ericson
16a60520f2
Merge pull request #8358 from fricklerhandwerk/output-addressed-references
fix wording on output-addressed store objects
2023-05-17 09:38:18 -04:00
Valentin Gagarin
76f40c02bf fix wording on output-addressed store objects
hashing is an implementation detail.
add references to the other terms.
2023-05-17 15:04:08 +02:00
Valentin Gagarin
6a5a8f51bb add cross-references to pure evaluation mode
use consistent wording everywhere.
add some details on the configuration option documentation.
2023-05-17 15:01:54 +02:00
Valentin Gagarin
549f8dc97b document builtins.currentTime 2023-05-17 13:49:35 +02:00
Valentin Gagarin
d8bfeda164 document identifier syntax for attribute sets
it's more likely for readers to find it right there.

this also slightly rewords examples to make them stand out better.
in the long run there probably needs to be a dedicated section on formal syntax, and better highlighting of examples.
2023-05-17 13:41:34 +02:00
Alexander Schmolck
8d4b6766e2 Convert short nix options to long ones
e.g. nix-env -e subversion => nix-env --uninstall subversion

The aim is to make the documentation less cryptic for newcomers and the
long options are more self-documenting.

The change was made with the following script:

<https://github.com/aschmolck/convert-short-nix-opts-to-long-ones>

and sanity checked visually.
2023-05-17 08:10:30 +01:00
Valentin Gagarin
8976769a1c
Reword info on XDG base dirs (#8338)
This gives some more context and should clarify why it works that way.
Also link it from the section on `NIX_USER_CONF_FILES`.

Co-authored-by: John Ericson <git@JohnEricson.me>
2023-05-15 23:30:20 -04:00
Valentin Gagarin
275468a1f0 list files used by nix-channel 2023-05-15 15:26:14 +02:00
John Ericson
914672dc4f
Merge pull request #8141 from tweag/user-files-doc
Document user files of nix
2023-05-15 07:11:47 -04:00
Victor Engmark
6e1bfb93dc refactor: Join commands to remove files 2023-05-15 11:05:26 +12:00
Victor Engmark
ed016a5bb0 docs: Mention more files referenced by the installer
`/etc/bash.bashrc` is backed up as `/etc/bash.bashrc.backup-before-nix`,
but since other changes might have been introduced in the meantime we can't
just tell the user to revert.
2023-05-15 11:03:27 +12:00
Victor Engmark
e26aad22c6 docs: Remove references to non-existing files
At least on Ubuntu 22.04, these files are not created as part of a multi-
user installation.
2023-05-15 10:26:47 +12:00
Victor Engmark
17a1c1ee4e docs: Sort files by name 2023-05-15 10:16:12 +12:00
Victor Engmark
3cc9b8630b docs: Remove Nix profile content from correct directory
At least on Ubuntu 22.04, the Nix installer creates
`/etc/profile.d/nix.sh`, not `/etc/profile/nix.sh`.
2023-05-15 10:13:46 +12:00
Victor Engmark
ccf512f4b8 docs: Remove redundant uninstall command
`sudo systemctl disable nix-daemon.socket nix-daemon.service` removes these
files already.
2023-05-15 10:06:27 +12:00
Valentin Gagarin
454e273451
Merge pull request #8328 from urbas/max-substitution-jobs 2023-05-14 11:59:40 +02:00
Matej Urbas
c66a7af0c6 max-substitution-jobs release note entry 2023-05-14 09:51:11 +01:00
Ana Hobden
17fb346ec6 Describe the or operation on attribute sets slightly more 2023-05-12 11:03:09 -07:00
Alexander Bantyev
992be330ab
Update doc/manual/src/SUMMARY.md.in
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-05-12 16:58:01 +04:00
Valentin Gagarin
70eb9c7ddb reword introduction to built-in functions
add anchor to `builtins.derivation` and list some built-in functions that are
exposed in the global scope.

I decided not to list everything, because we probably don't want to
encourage people using them that way.
2023-05-11 20:07:42 +02:00
Valentin Gagarin
69a0e6f86c reword documentation on builtins
- add anchor to `builtins`
- add type information
- reword description of `builtins` to offer more information concisely
2023-05-11 17:46:37 +02:00
Valentin Gagarin
2ef7f14e28 do not indent markdown list 2023-05-11 15:29:03 +02:00
Valentin Gagarin
dc8191ae14 add redirect to track moved uninstall section 2023-05-03 11:39:29 +02:00
Valentin Gagarin
5d78dc4176
doc rendering: add functions to scope explicitly (#7378)
* doc rendering: add functions to scope explicitly

this especially helps beginners with code readability, since the origin
of names is always immediately visible.
2023-05-03 07:16:29 +00:00
Valentin Gagarin
f8620758aa display documentation on manifest files separately
it's probably better not to show the manifest file documentation in the
command-specific pages, because these are implementation details that are not really practically useful.

this means no additional hassle for building the manual, but clutters
the table of contents a bit.
2023-04-28 12:10:36 +02:00
Valentin Gagarin
9b2a4a4729 move uninstall instructions to a separate page
placed in a subsection of the binary install, the instructions are hard
to find. putting them in a separate page that is shown in the table of
contents should make it easier for users to find what they need when
they need it.
2023-04-28 11:53:38 +02:00
Valentin Gagarin
da0dbf36cb move manifest information to the bottom of the page 2023-04-26 15:39:35 +02:00
Valentin Gagarin
be7c236565 move compatibility info to nix profile docs 2023-04-26 15:39:35 +02:00
Valentin Gagarin
219aaf5a0b increase heading level
otherwise the headings won't match at the point where they are included.
this is a bit hacky and brittle, but works for now.
2023-04-26 15:39:35 +02:00
Valentin Gagarin
bb8e3b5d86 update description on how profiles work
adapt to the example listing
2023-04-26 15:39:35 +02:00
Valentin Gagarin
7770d82240 fix typos and wording 2023-04-26 15:39:24 +02:00
Valentin Gagarin
9d386fe2ee add colons to connect listings with descriptions 2023-04-26 15:39:16 +02:00
Valentin Gagarin
a1c996dc7e list information regular users first
this is to make it consistent everywhere
2023-04-26 15:39:02 +02:00
Alexander Bantyev
8a93b5a551 Document user files of nix 2023-04-26 15:38:19 +02:00
Rynn Blackmon
c4df53f154
Mention $DRV_PATH in post-build-hook docs 2023-04-19 16:32:47 -07:00
Michael Utz
40fcb22313
Update installing-binary.md 2023-04-18 13:18:30 +03:00
Noah Snelson
324ed0c367 Documentation: fix typo for Nix database link in manual
Fixes broken link for `Nix database` anchor in the Glossary page of the
Nix manual.
2023-04-17 20:15:08 -07:00
Valentin Gagarin
39e0f609cc
Merge pull request #7514 from fricklerhandwerk/opt-I
remove incorrect reference to `NIX_PATH` documentation
2023-04-17 16:27:23 +02:00
Valentin Gagarin
f4119a67cc
use @docroot@ link 2023-04-17 14:54:30 +02:00
Valentin Gagarin
d0cf615cbb
add link to nix-conf setting
Co-authored-by: John Ericson <git@JohnEricson.me>
2023-04-17 14:27:26 +02:00
John Ericson
9800c1e807 Mark experimental configuration settings programmatically
Fix #8162

The test is changed to compare `nlohmann::json` values, not strings of dumped
JSON, which allows us to format things more nicely.
2023-04-16 10:58:04 -04:00
John Ericson
ba9ae691b6 Add optionalString to manual Nix lang utilities
Use it everywhere it could be also.
2023-04-16 10:57:46 -04:00
John Ericson
b41f739068
Merge pull request #7864 from obsidiansystems/quickstart-long-options
Use long options instead of short ones in the "quick start"
2023-04-14 09:13:16 -04:00
John Ericson
d93e76fbb8 Start cross-referencing experimental features
- Create a glossary entry for experimental features.

- Have the man page experimental feature notice link `nix-commmand`.

  (Eventually this should be programmed, based on whether the command is
  experimental, and if so what experimental feature does it depend on.)

- Document which installables depend on which experimental features.

  I tried to use the same style (bold warning and block quote) that the
  top of the man page uses.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-04-14 07:45:08 -04:00
Eelco Dolstra
e570a91661 Release notes 2023-04-11 12:40:56 +02:00
Eelco Dolstra
60a1bf08b6
Merge pull request #7798 from peeley/list-experimental-features
Documentation: list experimental features in manual
2023-04-11 11:55:35 +02:00
John Ericson
73eb6a2a57 Single page for experimental feature descriptions
As requested by @fricklerhandwerk.
2023-04-09 11:01:23 -04:00
John Ericson
9d1105824f Add release notes for nix derivation {add,show} 2023-04-07 08:35:59 -04:00
John Ericson
2b98af2e62 nix show-derivation -> nix derivation show 2023-04-07 08:34:58 -04:00
matthewcroughan
9207f94582 Add Store::isTrustedClient()
This function returns true or false depending on whether the Nix client
is trusted or not. Mostly relevant when speaking to a remote store with
a daemon.

We include this information in `nix ping store` and `nix doctor`

Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
2023-04-06 19:59:57 -04:00
John Ericson
bc192a95ef Describe active experimental features in the contributing guide
They are put in the manual separate pages under the new overarching
description of experimental features.

The settings page just lists the valid experimental feature names (so
people know what a valid setting entry looks like), with links to those
pages. It doesn't attempt to describe each experimental feature as that
is too much information for the configuration settings section.
2023-04-06 18:07:59 -04:00
John Ericson
b7cd87a853 Merge remote-tracking branch 'upstream/master' into list-experimental-features 2023-04-06 18:07:46 -04:00
Théophane Hufschmitt
9185639631
Document the concept of “experimental feature” (#5930)
Add a page explaining what “experimental features” are, when and how they should be used

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2023-04-06 11:25:22 +00:00
Valentin Gagarin
b11ae93581 remove incorrect reference
the semantics are not explained in the referenced section any more, they
have been moved to the documentation for common options in the new CLI [0].

[0]: 703d863a48
2023-04-05 14:03:11 +02:00
Valentin Gagarin
bbdb5a58c7
Merge pull request #7849 from milahu/fix-man-nix-shell
docs: fix nix-shell commands
2023-04-05 13:06:59 +02:00
milahu
1ac10808ba docs: fix nix-shell commands 2023-04-05 12:38:36 +02:00
Mike (stew) O'Connor
cab5266092 add a definition of the nix database to the glossary
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-04-05 10:50:34 +02:00
Valentin Gagarin
ed5d0c1362 add anchor to 'local store' 2023-04-05 10:48:59 +02:00
John Ericson
53d0836347 Assemble experimental feature docs outside of Nix itself
Instead of constructing a markdown list in C++ (which involved all sorts
of nasty string literals), export some JSON and assemble it with the
manual build system.

Besides following the precedent set with other dumped data, this is a
better separate of content and presentation; if we decide for example we
want to display this information in a different way, or in a different
section of the manual, it will become much easier to do so.
2023-04-04 22:57:11 -04:00
Valentin Gagarin
cde78f9417 process includes first
otherwise the order of found `.md` files will influence if `@docroot@`
is replaced before them being included, which may mess up relative
links.

the weirdest thing about it is that the mess-up happens
deterministically on macOS, but deterministically doesn't happen on
Linux!
2023-03-30 13:55:44 +02:00
Alexander Bantyev
36b059748d Split nix-env and nix-store documentation per-subcommand
Documentation on "classic" commands with many sub-commands are
notoriously hard to discover due to lack of overview and anchor links.
Additionally the information on common options and environment variables
is not accessible offline in man pages, and therefore often overlooked
by readers.

With this change, each sub-command of nix-store and nix-env gets its
own page in the manual (listed in the table of contents), and each own
man page.

Also, man pages for each subcommand now (again) list common options
and environment variables. While this makes each page quite long and
some common parameters don't apply, this should still make it easier
to navigate as that additional information was not accessible on the
command line at all.

It is now possible to run 'nix-store --<subcommand> --help` to display
help pages for the given subcommand.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-03-30 09:46:28 +02:00
Alexander Bantyev
84c2c09ec2 Manual: fail when #include-d file does not exist 2023-03-30 09:41:46 +02:00
John Ericson
8df6f7bb0f Fix more profile dirs in docs
Picking up where #8078 left off.
2023-03-27 12:10:32 -04:00
Eelco Dolstra
237587bc0a
Merge pull request #8084 from edolstra/store-docs
Auto-generate store documentation
2023-03-27 15:46:18 +02:00
Eelco Dolstra
5a0f5b5c34
Merge pull request #8062 from edolstra/ssl-cert-file
Add a setting for configuring the SSL certificates file
2023-03-27 15:37:15 +02:00
Eelco Dolstra
7a61a9aba3 Update release notes 2023-03-23 15:27:06 +01:00
Eelco Dolstra
05d9918a9c
Update doc/manual/src/release-notes/rl-next.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-03-23 10:13:51 +01:00
Eelco Dolstra
4d31618c15 showSetting: Drop ... 2023-03-23 10:09:25 +01:00
Eelco Dolstra
2851e239a7 Make useAnchors a named argument 2023-03-23 10:08:49 +01:00
Eelco Dolstra
fbc296e00f
Merge pull request #8095 from fricklerhandwerk/operators-formatting
doc: force line breaks where needed
2023-03-23 09:24:54 +01:00
Valentin Gagarin
0ced5132fd
Merge pull request #6865 from zuzuleinen/manual-nix-path-empty
document what happens when NIX_PATH is empty
2023-03-23 00:10:17 +01:00
Valentin Gagarin
96129246ad
add links 2023-03-22 23:37:27 +01:00
Valentin Gagarin
40eb88e427 doc: force line breaks where needed 2023-03-22 22:46:23 +01:00
Eelco Dolstra
5691bac202 Improve store setting descriptions / Markdown formatting 2023-03-22 14:23:36 +01:00
Eelco Dolstra
da8903ecc3 nix help-stores: Don't include anchors
Since setting names are not unique we don't have an easy way to
produce unique anchors.
2023-03-22 13:11:35 +01:00
Eelco Dolstra
006291e5be
Merge pull request #8082 from edolstra/add-links
Add links to API docs / coverage analysis to the hacking section
2023-03-22 11:27:18 +01:00
Eelco Dolstra
3fc4659d22 Formatting 2023-03-21 14:12:15 +01:00
Eelco Dolstra
9eb53bbf17 Support per-store Markdown documentation 2023-03-21 14:03:40 +01:00
Eelco Dolstra
7704118d28 nix describe-stores: Remove
This command was intended for docs generation, but it was never used
for that and we don't need it.
2023-03-21 14:03:40 +01:00
Eelco Dolstra
8d6d59cb1b nix store --help: Include store type documentation 2023-03-21 14:03:40 +01:00
Eelco Dolstra
6f62cb3611 generate-manpage.nix: Make more readable 2023-03-21 12:11:32 +01:00
Eelco Dolstra
4b9add9b35 Add links to API docs / coverage analysis to the hacking section 2023-03-21 11:47:21 +01:00
Eelco Dolstra
e53e5c38d4 Add a setting for configuring the SSL certificates file
This provides a platform-independent way to configure the SSL
certificates file in the Nix daemon. Previously we provided
instructions for overriding the environment variable in launchd, but
that obviously doesn't work with systemd. Now we can just tell users
to add

  ssl-cert-file = /etc/ssl/my-certificate-bundle.crt

to their nix.conf.
2023-03-17 18:32:18 +01:00
Yueh-Shun Li
c27d358abb nix-hash: support base-64 and SRI format
Add the --base64 and --sri flags for the Base64 and SRI format output.

Add the --base16 flag to explicitly specify the hexadecimal format.

Add the --to-base64 and --to-sri flag to convert a hash to the above
mentioned format.
2023-03-16 03:08:42 +08:00
Valentin Gagarin
d37b8a29ce
Merge pull request #8036 from Freed-Wu/patch-1 2023-03-13 14:35:09 +01:00
Eelco Dolstra
6f22e8b7d8
Merge pull request #7486 from fricklerhandwerk/doc-reference
reword definition of "reference"
2023-03-13 14:04:14 +01:00
wzy
5bf4ade0fa
Fix a typo of values.md 2023-03-13 15:34:01 +08:00
John Ericson
6910f5dcb6 Generate API docs with Doxygen
The motivation is as stated in issue #7814: even though the the C++ API
is internal and unstable, people still want it to be well documented for
sake of learning, code review, and other purposes that aren't predicated
on it being stable.

Fixes #7814

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-03-10 12:51:06 -05:00
Valentin Gagarin
66f49864f3
Merge pull request #7928 from serokell/doc-includes
Documentation: process `#include` directives
2023-03-10 17:06:42 +01:00
Valentin Gagarin
2af9fd20c6 clarify definition of "installable"
the term was hard to discover, as its definition and explanation were in
a very long document lacking an overview section.
search did not help because it occurs so often.

- clarify wording in the definition
- add an overview of installable types
- add "installable" to glossary
- link to definition from occurrences of the term
- be more precise about where store derivation outputs are processed
- installable Nix expressions must evaluate to a derivation

Co-authored-by: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com>
2023-03-05 01:46:17 +01:00
Valentin Gagarin
e065131c1b
cosmetic indentation
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2023-03-03 12:56:23 +01:00
Théophane Hufschmitt
1f394d2107
Merge branch 'master' into paths-from-stdin 2023-03-02 19:20:51 +01:00
Eelco Dolstra
96111ad902
Merge pull request #7901 from hercules-ci/disable-tests
Add ./configure --disable-tests option
2023-03-02 10:00:15 +01:00
Alexander Bantyev
dd0aab2f94
Documentation: process #include directives 2023-03-01 14:01:45 +04:00
Alexander Bantyev
21fb1a5ec2
doc/manual/local.mk: Use tabs instead of spaces everywhere 2023-03-01 14:01:23 +04:00
Alexander Bantyev
2fc3a15861
Make nix-env less prominent in manual TOC 2023-03-01 13:54:45 +04:00
John Ericson
ea0adfc582 Get rid of .drv special-casing for store path installables
The release notes document the change in behavior, I don't include it
here so there is no risk to it getting out of sync.

> Motivation

>> Plumbing CLI should be simple

Store derivation installations are intended as "plumbing": very simple
utilities for advanced users and scripts, and not what regular users
interact with. (Similarly, regular Git users will use branch and tag
names not explicit hashes for most things.)

The plumbing CLI should prize simplicity over convenience; that is its
raison d'etre. If the user provides a path, we should treat it the same
way not caring what sort of path it is.

>> Scripting

This is especially important for the scripting use-case. when arbitrary
paths are sent to e.g. `nix copy` and the script author wants consistent
behavior regardless of what those store paths are. Otherwise the script
author needs to be careful to filter out `.drv` ones, and then run `nix
copy` again with those paths and `--derivation`. That is not good!

>> Surprisingly low impact

Only two lines in the tests need changing, showing that the impact of
this is pretty light.

Many command, like `nix log` will continue to work with just the
derivation passed as before. This because we used to:

- Special case the drv path and replace it with it's outputs (what this
  gets rid of).

- Turn those output path *back* into the original drv path.

Now we just skip that entire round trip!

> Context

Issue #7261 lays out a broader vision for getting rid of `--derivation`,
and has this as one of its dependencies. But we can do this with or
without that.

`Installable::toDerivations` is changed to handle the case of a
`DerivedPath::Opaque` ending in `.drv`, which is new: it simply doesn't
need to do any extra work in that case. On this basis, commands like
`nix {show-derivation,log} /nix/store/...-foo.drv` still work as before,
as described above.

When testing older daemons, the post-build-hook will be run against the
old CLI, so we need the old version of the post-build-hook to support
that use-case.

Co-authored-by: Travis A. Everett <travis.a.everett@gmail.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-02-28 17:07:05 -05:00
Timothy DeHerrera
639659dec2
doc/manual: add release note for --stdin flag 2023-02-28 12:31:05 -07:00
Timothy DeHerrera
df643051e2
nix-store: read paths from standard input
Resolves #7437 for new `nix-store` by adding a `--stdin` flag.
2023-02-28 12:29:16 -07:00
Robert Hensing
d0d0b9a748 doc/cli-guideline: Improve examples
Turns out that the settings themselves have a bad data model anyway, so we cut that. They do still occur in the first example, but not in focus.
2023-02-28 16:35:47 +01:00
Robert Hensing
17f70b10bf doc/cli-guideline: Apply suggestions from code review
Thanks Valentin!
2023-02-28 16:35:42 +01:00
Robert Hensing
f09ccd8ea9 doc/cli-guideline: Add JSON guideline 2023-02-28 16:35:36 +01:00
Eelco Dolstra
1e07102937 Release notes 2023-02-28 13:44:14 +01:00
Valentin Gagarin
1b49e6fea9
use the term reference correctly 2023-02-27 13:04:54 +01:00
Valentin Gagarin
b0c23999d2
add link to definition 2023-02-27 12:56:22 +01:00
Valentin Gagarin
ec317949f9
remove "references" as distinct term 2023-02-27 12:55:14 +01:00
Robert Hensing
e76619a402 rl-next: Describe fixed flake outPath semantics
The reference documentation already implies the correct semantics.
2023-02-26 14:41:23 +01:00
Robert Hensing
c6051cac6f doc: Add test dependencies to prerequisites 2023-02-24 09:59:25 +01:00
Robert Hensing
df6829e0d7
Merge pull request #7867 from NixOS/hacking-cross
doc/hacking.md: Corrections and additions for cross
2023-02-20 22:25:55 +01:00
Robert Hensing
807ef8f734
doc/hacking.md: Corrections and additions for cross 2023-02-20 12:20:08 +01:00
John Ericson
d7a4f08d42
Nix's own flake: Dedup and memoize more
- `nixpkgsFor` does all of native, static, cross, and the different stdenvs.

- The main Nix derivation is no longer duplicated for static.

- DRY nixpkgs.lib and lib.genAttrs calls.
2023-02-20 11:35:51 +01:00
Théophane Hufschmitt
9a3f66d9d9
Merge pull request #7433 from yorickvP/improv-onboarding
Improve hacking.md and add clangd+bear to devshell
2023-02-20 10:50:08 +01:00
John Ericson
ddb40ddd47
Update doc/manual/src/quick-start.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-02-19 20:00:02 -05:00
Clemens Tolboom
8c09888de4 Use long options instead of short ones
It is a little hard to learn what the options mean.
2023-02-19 13:48:37 -05:00
Eelco Dolstra
c205d10c66
Merge pull request #7616 from hercules-ci/fix-3898
Fix foreign key error inserting into NARs #3898
2023-02-13 13:02:19 +01:00
Yorick van Pelt
f2e427942d
Improve hacking.md
- Refer to current version in readme
- Split into flakes and non-flakes section
- Change order to move nix-build to the end, since people often start
  with it in the beginning.
- Use proper "Note" syntax
- Add notes about editor integration
- Move information about target platforms and stdenvs into separate
  sections

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Alexander Bantyev <alexander.bantyev@tweag.io>
Co-authored-by: Théophane Hufschmitt <theophane.hufschmitt@tweag.io>
2023-02-13 12:00:00 +04:00
Théophane Hufschmitt
9ebbe35817
Merge pull request #5588 from tweag/balsoft/xdg
Follow XDG Base Directory standard
2023-02-10 18:05:50 +01:00
Alexander Bantyev
2384d36083
A setting to follow XDG Base Directory standard
XDG Base Directory is a standard for locations for storing various
files. Nix has a few files which seem to fit in the standard, but
currently use a custom location directly in the user's ~, polluting
it:

- ~/.nix-profile
- ~/.nix-defexpr
- ~/.nix-channels

This commit adds a config option (use-xdg-base-directories) to follow
the XDG spec and instead use the following locations:

- $XDG_STATE_HOME/nix/profile
- $XDG_STATE_HOME/nix/defexpr
- $XDG_STATE_HOME/nix/channels

If $XDG_STATE_HOME is not set, it is assumed to be ~/.local/state.

Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
Co-authored-by: Tim Fenney <kodekata@gmail.com>
Co-authored-by: pasqui23 <pasqui23@users.noreply.github.com>
Co-authored-by: Artturin <Artturin@artturin.com>
Co-authored-by: John Ericson <Ericson2314@Yahoo.com>
2023-02-10 20:14:06 +04:00
Eelco Dolstra
bffb76264e
Merge pull request #7800 from PicoGeyer/patch-1
Fix minor syntax issue in one of the examples.
2023-02-10 17:09:19 +01:00
Théophane Hufschmitt
320e391171
Merge pull request #7403 from fricklerhandwerk/noselect
disallow selecting shell prompt in code samples
2023-02-10 13:12:23 +01:00
Pico Geyer
a0f1cb0ce7 Fix minor syntax issue in the one of the examples.
Attribute set expressions need to end with a ;
2023-02-10 12:01:44 +02:00
Valentin Gagarin
c1921514d4
Merge pull request #7700 from iFreilicht/patch-1
docs: Fix small formatting errors
2023-02-07 23:37:42 +01:00
Robert Hensing
1a86d3e98e local.mk: Don't log docroot comments
These were accidentally logged and do not need to appear in make's
log output.
2023-02-07 23:34:36 +01:00
David Dunn
9aeaf98c4b
Make install command in documentation compatible with fish shell (#7474)
Use a pipe for all install commands

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-02-07 22:32:27 +00:00
Felix Uhl
d910dfe978 docs: Fix formatting of || operator
This is a workaround for
[mdBook#2000](https://github.com/rust-lang/mdBook/issues/2000)
2023-02-07 23:06:14 +01:00
Felix Uhl
32db5e6349 docs: Fix broken anchor link 2023-02-07 23:06:14 +01:00
Eelco Dolstra
1ba13b17db
Merge pull request #7758 from peterbecich/clang11-devshell-documentation
fix documentation for `clang11Stdenv` dev shell
2023-02-07 22:35:31 +01:00
Valentin Gagarin
f370a5a26c
Update doc/manual/src/glossary.md
Co-authored-by: John Ericson <git@JohnEricson.me>
2023-02-07 20:40:29 +01:00
Valentin Gagarin
8ab9fdac01
Merge pull request #7768 from ncfavier/fixup-7714 2023-02-07 16:24:19 +01:00
Valentin Gagarin
c20394245d add "instantiate" to glossary 2023-02-07 12:09:26 +01:00
Valentin Gagarin
e4f12ff482
store paths are not uniquely determined 2023-02-07 11:59:18 +01:00
Naïm Favier
2915db7b28
doc: fixup 7714 2023-02-07 11:38:09 +01:00
Peter Becich
b8e96351f7
fix clang11Stdenv dev shell documentation
`clang11StdenvPackages` does not exist

```
│   └───x86_64-linux
│       ├───ccacheStdenv: development environment 'nix'
│       ├───clang11Stdenv: development environment 'nix'
│       ├───clangStdenv: development environment 'nix'
│       ├───default: development environment 'nix'
│       ├───gccStdenv: development environment 'nix'
│       ├───libcxxStdenv: development environment 'nix'
│       └───stdenv: development environment 'nix'
```
2023-02-05 12:00:48 -08:00
Eelco Dolstra
5cbeff64f2
Merge pull request #7607 from Hoverbear/installation-expand
Expand installation.md
2023-02-02 17:05:54 +01:00
Eelco Dolstra
6f0436a337
Merge pull request #7719 from andersk/manual-timestamp
manual: Document that the store timestamp is now 1, not 0
2023-02-01 15:50:36 +01:00
Anders Kaseorg
c5d4c50aba manual: Document that the store timestamp is now 1, not 0
Commit 14bc3ce3d6 (0.13~43) changed the
timestamps in the Nix store from 0 to 1.  Update the nix-store man
page to match.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2023-01-30 23:51:35 -08:00
Naïm Favier
0b3464a107
doc: add __structuredAttrs, outputChecks, unsafeDiscardReferences 2023-01-30 14:49:45 +01:00
Théophane Hufschmitt
7408776b00 Fix the release-notes
Slightly butchered during the merge
2023-01-30 10:32:23 +01:00
Théophane Hufschmitt
4aaf0ee52e
Merge branch 'master' into referenceablePaths 2023-01-30 10:31:00 +01:00
John Ericson
f465e378c4
Update doc/manual/src/release-notes/rl-2.13.md
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2023-01-25 08:58:41 -05:00
John Ericson
816031173c Fix the 2.13 changelog
It is just the new CLI that gets the `^` syntax. The old CLI already has
a (slightly different) `!` syntax.

Fixes #7682
2023-01-24 18:53:46 -05:00
Felix Uhl
dc4aa383e9 doc: fix anchor links in and to glossary 2023-01-24 00:19:43 +01:00
Robert Hensing
9b56683398
Merge pull request #7447 from aakropotkin/read-file-type
Read file type
2023-01-23 17:37:22 +01:00
John Ericson
7fe308c2f8 Add rapidcheck dependency for testing
Property tests are great!

Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2023-01-23 07:05:50 -05:00
Robert Hensing
37c533ed27
rl-next.md: Minor improvement 2023-01-23 11:28:31 +01:00
Théophane Hufschmitt
90e630a542
Merge pull request #7641 from layus/coerce-strings-fixups
Coerce strings fixups
2023-01-23 09:39:00 +01:00
Alex Ameen
153ee460c5 primop: add readFileType, optimize readDir
Allows checking directory entry type of a single file/directory.

This was added to optimize the use of `builtins.readDir` on some
filesystems and operating systems which cannot detect this information
using POSIX's `readdir`.

Previously `builtins.readDir` would eagerly use system calls to lookup
these filetypes using other interfaces; this change makes these
operations lazy in the attribute values for each file with application
of `builtins.readFileType`.
2023-01-22 13:45:02 -06:00
Florian Paul Schmidt
4ff9ed5c2d doc: fix update operator description 2023-01-20 13:21:45 +01:00
Théophane Hufschmitt
fdc02d2b6a
Merge pull request #7490 from fricklerhandwerk/doc-realise
define the terms "realise" and "valid" for store paths
2023-01-20 11:19:45 +01:00
Valentin Gagarin
b911307d7a
Merge pull request #7629 from phip1611/patch-3 2023-01-19 16:41:20 +01:00
Philipp Schuster
9469b1bb30 doc: update language/index.md
- make `<nixpkgs>` visible (was blank in the rendered version)
2023-01-19 15:11:20 +01:00
Guillaume Maudoux
e4726a0c79 Revert "Revert "Merge pull request #6204 from layus/coerce-string""
This reverts commit 9b33ef3879.
2023-01-19 13:23:04 +01:00
Eelco Dolstra
38b90c618f
Merge pull request #7640 from marceltransier/patch-2
Fix update operator usage in operators.md
2023-01-19 11:12:10 +01:00
Marcel Transier
8b9325ec4a
Fix update operator usage in operators.md 2023-01-19 10:20:41 +01:00
Marcel Transier
9141b74eb7
Fix markdown error in operators.md
Escape logical or pipe in markdown table according to https://github.github.com/gfm/#example-200
2023-01-18 22:34:49 +01:00
Lorenzo Manacorda
913782af4d Relase notes: add empty flake registry
Introduced in #5420
2023-01-18 17:34:19 +01:00
Philipp Schuster
70e193d64b
Update binary-cache-substituter.md (#7628)
`binary-caches` is deprecated and `substituters` the new recommended option.
2023-01-18 15:08:20 +00:00
Robert Hensing
9b33ef3879 Revert "Merge pull request #6204 from layus/coerce-string"
This reverts commit a75b7ba30f, reversing
changes made to 9af16c5f74.
2023-01-18 01:34:07 +01:00
Eelco Dolstra
3ff9fc0d7d Typo 2023-01-17 17:03:30 +01:00
Eelco Dolstra
c1934eb074 Release notes 2023-01-17 13:23:31 +01:00
Valentin Gagarin
9be3c6c7c7 add note on self-references and cycles
Co-authored-by: John Ericson <git@JohnEricson.me>
2023-01-17 12:33:23 +01:00
Valentin Gagarin
59f03437c2 references refer to store objects, not paths
as noted by @Ericson2314
2023-01-17 12:29:45 +01:00
Valentin Gagarin
bc9de373c7 reword definition of "reference" 2023-01-17 12:29:45 +01:00
Ana Hobden
763c1dfc2b Expand installation.md
Changes the `quick-start.md` to recommend a multi-user install, since
single-user is not supported on MacOS and https://nixos.org/download.html
recommends multi-user.

Expands `installation.md` to reflect wording on https://nixos.org/download.html
2023-01-16 11:38:50 -08:00
Robert Hensing
f58c301112
Merge pull request #7541 from hercules-ci/check-manual-links
Check links in the manual
2023-01-10 23:07:38 +01:00
Robert Hensing
6ae4d762d0 doc/manual/src/contributing/hacking.md: Apply suggestion
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-01-10 22:30:41 +01:00
Robert Hensing
da4d4feacf doc/manual/hacking: Document @docroot@ variable 2023-01-10 22:30:41 +01:00
Robert Hensing
fefa3a49ce doc/manual: Apply suggestions from code review
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-01-10 22:30:41 +01:00
Robert Hensing
fd2af69e60 doc/manual: Move the html files back where they were before
... before the link checking "output" was added, bumping the
html output into a subdirectory.
2023-01-10 22:30:41 +01:00
Robert Hensing
d5c8289f1e doc/manual: Document hacking on the manual links 2023-01-10 22:30:41 +01:00
Robert Hensing
e79f935718 doc/manual: Fix broken internal links
The targets I could find.
2023-01-10 22:30:41 +01:00
Robert Hensing
34a1e0d29b doc/manual: Introduce @docroot@ as a stable base for includable snippets
This way the links are clearly within the manual (ie not absolute paths),
while allowing snippets to reference the documentation root reliably,
regardless of at which base url they're included.
2023-01-10 22:30:41 +01:00
Robert Hensing
be10c09d23 manual: Check links
mdbook-linkcheck is not consistent about its warning setting.
It disables some warnings, but not the warnings about lack of
fragment checking support; hence the extra filtering.
2023-01-10 22:30:41 +01:00
Jeremy Fleischman
89ef26664d
Add a pointer from "realising" to nix log. (#4876) 2023-01-09 09:49:46 +01:00
Eelco Dolstra
3172c51baf
Merge pull request #7498 from fricklerhandwerk/path+string
refactor documentation of operators, document `+` for strings and paths
2023-01-06 13:46:31 +01:00
Eelco Dolstra
d02c5a41da
Merge pull request #7500 from akhildevelops/patch-1
Updated docs to delete build users and group
2023-01-05 17:25:06 +01:00
Valentin Gagarin
e57165b85a bring back table, extract annotations
this makes the table less unwieldy, and leaves enough space for
extensive explanations.
2023-01-05 15:16:16 +01:00
Valentin Gagarin
7da59e94ae add links to documentation for data types 2023-01-05 14:15:01 +01:00
Valentin Gagarin
7b2b9e3648 use more self-explanatory placeholder names 2023-01-05 14:15:01 +01:00
Valentin Gagarin
969e5ad5bf add semantics of overloaded + operator 2023-01-05 14:15:01 +01:00
Valentin Gagarin
63b640e0c2 reword descriptions of operators
add notes on semantics where appropriate
2023-01-05 14:15:01 +01:00
Valentin Gagarin
e07448ba6b convert table to subsections
this form is much easier to maintain (also with minimal diffs), and
allows for more details on each operator.

this change a purely mechanical transformation, without changing any contents.
2023-01-05 14:15:01 +01:00
Valentin Gagarin
caebe4112e reorder columns
this is for a simpler transformation into a series of subsections
2023-01-05 14:15:01 +01:00
Naïm Favier
3c968191f1
move unsafeDiscardReferences out of outputChecks
It's not a check.
2023-01-03 18:53:01 +01:00
Naïm Favier
15f7fa59be
unsafeDiscardReferences
Adds a new boolean structured attribute
`outputChecks.<output>.unsafeDiscardReferences` which disables scanning
an output for runtime references.

    __structuredAttrs = true;
    outputChecks.out.unsafeDiscardReferences = true;

This is useful when creating filesystem images containing their own embedded Nix
store: they are self-contained blobs of data with no runtime dependencies.

Setting this attribute requires the experimental feature
`discard-references` to be enabled.
2023-01-03 17:19:16 +01:00
Valentin Gagarin
9cb1610257 define the terms "realise" and "valid" for store paths
add links to the glossary definition where the terms are used
2023-01-03 13:53:53 +01:00
Eelco Dolstra
6b69652385 Merge remote-tracking branch 'origin/master' into coerce-string 2023-01-02 20:53:39 +01:00
Théophane Hufschmitt
34a31b33f1
Merge pull request #7278 from fricklerhandwerk/antiquotation
antiquotation -> string interpolation
2023-01-02 15:03:45 +01:00
Théophane Hufschmitt
a654ae8269
Merge pull request #7066 from fricklerhandwerk/architecture-overview
manual: architecture overview
2023-01-02 14:42:01 +01:00
Valentin Gagarin
e0c4a95611 antiquotation -> string interpolation
as proposed by @mkaito[1] and @tazjin[2] and discussed with @edolstra
and Nix maintainers

[1]: https://github.com/NixOS/nix.dev/pull/267#issuecomment-1270076332
[2]: https://github.com/NixOS/nix.dev/pull/267#issuecomment-1270201979

Co-authored-by: John Ericson <git@JohnEricson.me>
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2023-01-02 14:38:57 +01:00
Eelco Dolstra
80a0f77e49
Merge pull request #7470 from obsidiansystems/simplify-tests-slightly
Make `./mk/run-test.sh` work by itself; add `mk/debug-test.sh`
2023-01-02 14:14:30 +01:00
Théophane Hufschmitt
cfd6c7fc9b
Merge pull request #7485 from fricklerhandwerk/doc-store-derivation
define "store derivation"
2023-01-02 13:26:41 +01:00
John Ericson
efbd1d15c6
Apply suggestions from code review
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-12-23 08:59:36 -08:00
Eelco Dolstra
c164d304f3 nix develop: Set personality
This makes 'nix develop' set the Linux personality in the same way
that the actual build does, allowing a command like 'nix develop
nix#devShells.i686-linux.default' on x86_64-linux to work correctly.
2022-12-23 16:33:55 +01:00
Akhil
a3a0e414c2
Deletes build users and group 2022-12-23 14:06:51 +05:30
Valentin Gagarin
7797661a70 link "store derivation" to glossary definition 2022-12-21 11:42:50 +01:00
Valentin Gagarin
3a66d82e1d update description of "store derivation" in installables section
a store derivation is not a store path itself, it has a store path.
2022-12-21 11:42:22 +01:00
Valentin Gagarin
62f4f883a7 define "store derivation" 2022-12-21 11:42:22 +01:00
John Ericson
0251d44cc2 Make ./mk/run-test.sh work by itself; add mk/debug-test.sh
First, logic is consolidated in the shell script instead of being spread
between them and makefiles. That makes understanding what is going on a
little easier.

This would not be super interesting by itself, but it gives us a way to
debug tests more easily. *That* in turn I hope is much more compelling.
See the updated manual for details.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2022-12-21 02:28:33 -05:00
Robert Hensing
1437582ccd
doc/book.toml: Improve config (#7300)
* doc/book.toml: Improve config

 - `title` value will be added to the HTML <title> - here</title>

 - `git-repository-url` adds a link to the GitHub repo in the top right corner

 - `edit-url-template` adds an edit link, inviting contributions

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-12-20 16:29:32 +01:00
Valentin Gagarin
7e31a991db make relative links explicit 2022-12-20 14:28:43 +01:00
Valentin Gagarin
c162c90b43 add more explanation to diagrams
this is to help reading the diagrams, otherwise arrows and labels were
reported as being ambiguous.
2022-12-20 09:59:59 +01:00
Eelco Dolstra
9fa8b02c41
Merge pull request #7456 from ncfavier/fix-links
doc: fix links
2022-12-13 17:27:13 +01:00
Naïm Favier
129ece7ce9
doc: fix links 2022-12-13 15:49:40 +01:00
John Ericson
5273cf4c97 Merge remote-tracking branch 'upstream/master' into indexed-store-path-outputs 2022-12-12 17:40:49 -05:00
John Ericson
dabb03b8d0 Merge remote-tracking branch 'upstream/master' into indexed-store-path-outputs 2022-12-12 17:36:02 -05:00
John Ericson
c7cce3e4e1 Improve release notes 2022-12-12 16:29:49 -05:00
Valentin Gagarin
4ed8bb1cb1 suggestions from review 2022-12-12 14:29:24 +01:00
Eelco Dolstra
fa409131cd Add links to the manual
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-12-12 14:05:54 +01:00
Eelco Dolstra
fd0ed75118 Support flake references in the old CLI
Fixes #7026.
2022-12-12 14:05:52 +01:00
Eelco Dolstra
7396844676
Merge pull request #7421 from edolstra/lazy-trees-trivial-changes
Trivial changes from the lazy-trees branch
2022-12-12 13:52:56 +01:00
John Ericson
1879c7c95e
Merge branch 'master' into indexed-store-path-outputs 2022-12-12 07:33:36 -05:00
Eelco Dolstra
c66c904a05 Tweak NIX_PATH description 2022-12-12 12:54:15 +01:00
Eelco Dolstra
add417ec14 Fix indentation 2022-12-12 12:46:54 +01:00
Eelco Dolstra
037d5c4299
Manual improvements
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-12-12 12:43:44 +01:00
Théophane Hufschmitt
830b3bddf9
Merge pull request #7324 from CircuitCoder/master
Update uninstall guide involving systemd
2022-12-09 13:57:26 +01:00
Théophane Hufschmitt
1dd7779c7c
Merge pull request #7379 from fricklerhandwerk/refactor-generate-options
refactor rendering documentation of options
2022-12-08 06:39:13 +01:00
Valentin Gagarin
ebeaf03558 do not render links in man pages
this is a follow-up on e7dcacb.

most links are relative and this should not be too much of a detriment.
2022-12-07 16:20:25 +01:00
Valentin Gagarin
b8a1ff98c1 use HTML anchors for config parameters
this avoids incorrect rendering on the man pages, since `lowdown`
neither parses the anchor syntax nor HTML.

this should rather be fixed in lowdown, as adding more anchors
would otherwise produce ever more noise and error-prone repetition.
2022-12-07 16:18:50 +01:00
Eelco Dolstra
b5b7902a08
Merge branch 'master' into remove-repeat 2022-12-07 16:04:47 +01:00
Eelco Dolstra
703d863a48 Trivial changes from the lazy-trees branch 2022-12-07 14:06:34 +01:00
endgame
c710aa1abd
Post build hook signing (#7408)
* docs: Use secret-key-files when demonstrating post-build-hooks

The docs used to recommend calling `nix store sign` in a post-build
hook, but on more recent versions of nix, this results in unsigned
store paths being copied into binary caches. See
https://github.com/NixOS/nix/issues/6960 for details.

Instead, use the `secret-key-files` config option, which signs all
locally-built derivations with the private key.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-12-07 13:55:02 +01:00
Linus Heckemann
8e0946e8df Remove repeat and enforce-determinism options
These only functioned if a very narrow combination of conditions held:

- The result path does not yet exist (--check did not result in
  repeated builds), AND
- The result path is not available from any configured substituters, AND
- No remote builders that can build the path are available.

If any of these do not hold, a derivation would be built 0 or 1 times
regardless of the repeat option. Thus, remove it to avoid confusion.
2022-12-07 11:36:48 +01:00
Eelco Dolstra
5b4b2eefa1 Release notes 2022-12-06 13:55:09 +01:00
Valentin Gagarin
180538672a disallow selecting shell prompt in code samples
this is a quick half-fix for command line examples, as discussed
discussed in [1].

[1]: https://github.com/NixOS/nix/pull/7389

examples which look like this

    $ foo bar
    baz

are confusing for Unix shell beginners, because it's hard to discern
what is supposed to be entered into the actual command line when the
convention of prefixing `$` is not known, as barely any real-world shell
looks that way any more.

this change prevents selecting the prompt part with the mouse in the
HTML representation of the Nix manual.

it does not prevent selecting the output part of the shell example.
it also does not address that the copy button provided by mdBook takes
the entire sample, including the prompts, into the clipboard.
2022-12-05 11:01:46 +01:00
Valentin Gagarin
ca42068bdc
Merge pull request #7251 from RelationalAI-oss/sp-docs-uninstall-prompt
docs: drop shell prompt character for consistency
2022-12-01 19:24:09 +01:00
Valentin Gagarin
dfa27e6b2f refactor rendering documentation of options
this makes more obvious what the code produces, and the structure of the
output easier to change
2022-12-01 06:08:08 +01:00
Valentin Gagarin
0ea62670ed move documentation on auto-allocate-uids to options docs
this is where it belongs and can be found together with the other
options.
2022-12-01 04:40:02 +01:00
Valentin Gagarin
3f881e3378
add missing newline, for consistent formatting 2022-11-30 23:40:53 +01:00
Théophane Hufschmitt
0596bdf3a9
Merge pull request #7342 from fricklerhandwerk/refactor-generate-builtins
refactor rendering documentation of builtins
2022-11-29 15:55:43 +01:00
Eelco Dolstra
7dd3e1fec4 Add example 2022-11-28 22:04:51 +01:00
Eelco Dolstra
67bcb99700 Add a setting for enabling cgroups 2022-11-28 21:54:02 +01:00
Liu Xiaoyi
c4ce89f772
Clarify uninstallation steps on Linux
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-11-26 22:01:51 +08:00
John Ericson
26534f141c
Merge branch 'master' into indexed-store-path-outputs 2022-11-25 08:14:32 -05:00
Valentin Gagarin
d6318e1638 refactor rendering documentation of builtins
as in [1], make the document structure visible, like in a template

[1]: 4655563470
2022-11-24 14:15:43 +01:00
Eelco Dolstra
2aa3f2e810 Include UID in hex 2022-11-23 17:07:59 +01:00
Eelco Dolstra
989fc8a8b9 Add release notes 2022-11-23 15:24:50 +01:00
Valentin Gagarin
52f0c80917 fix error in language overview
it is not possible to antiquote numbers.
2022-11-22 10:36:21 +01:00
Liu Xiaoyi
4d55acf515
Apply suggestions from code review
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-11-21 13:46:22 +08:00
Liu Xiaoyi
cc620d961f Updated uninstall guide involving systemd
Co-authored-by: sequencer <liu@jiuyang.me>
2022-11-20 20:04:29 +08:00
Théophane Hufschmitt
6bf8736517 Add release-notes for the context-restriction in readFile 2022-11-14 15:03:53 +01:00
Théophane Hufschmitt
302ddee749
Merge pull request #7279 from fricklerhandwerk/uninstall
add removing users to uninstall instructions
2022-11-11 14:39:07 +01:00
Valentin Gagarin
2af036e5a3
remove stray comma 2022-11-11 14:01:13 +01:00
Théophane Hufschmitt
f225f43076
Merge pull request #7006 from fricklerhandwerk/redirects
manual: generalize anchor redirects
2022-11-09 11:23:26 +01:00
Valentin Gagarin
9d20a056c8 remove external link
the language has its own overview page where its properties are
described in sufficient detail.
2022-11-09 01:36:17 +01:00
Valentin Gagarin
3d716df7ce make diagrams compatible with svgbob
this will at some point enable rendering them nicely for the web
2022-11-09 01:29:01 +01:00
Valentin Gagarin
98447c1a7f clarify subject of sentence
Co-authored-by: Bryan Honof <bryan.honof@tweag.io>
2022-11-09 01:29:01 +01:00
Valentin Gagarin
b5728ace5d add articles 2022-11-09 01:29:01 +01:00
Valentin Gagarin
be8744f937 manual: architecture overview
these changes were not merged properly and had to be reverted.

see merge commit d8e54d19f7 for full
history leading up to here.
2022-11-09 01:29:01 +01:00
Valentin Gagarin
d8781c4fc5 add removing users to uninstall instructions 2022-11-09 01:11:47 +01:00
Valentin Gagarin
ffca3e34cb
Merge pull request #6906 from fricklerhandwerk/language-overview
add syntax overview from NixOS manual
2022-11-09 00:52:53 +01:00
Valentin Gagarin
daedaa197d fix typos in comments 2022-11-09 00:49:34 +01:00
Valentin Gagarin
f7ab93b068 manual: build action -> build task
after discussing this with multiple people, I'm convinced that "build
task" is more precise: a derivation is not an action, but inert until it
is built. also it's easier to pronounce.

proposal: use "build task" for the generic concept "description of how
to derive new files from the contents of existing files". then it will
be easier to distinguish what we mean by "derivation" (a specific data
structure and Nix language value type) and "store derivation" (a
serialisation of a derivation into a file in the Nix store).
2022-11-06 13:28:18 +01:00
Sagar Patel
c068cce107
docs: drop shell prompt character for consistency
In addition to consistency, the fancy "Copy to clipboard" button on the
website will copy the prompt character. Retaining the prompt character
would mean having to edit each command after pasting in the terminal.
2022-11-01 00:09:00 -04:00
John Ericson
13f2a6f38d
Merge branch 'master' into indexed-store-path-outputs 2022-10-28 23:22:18 +01:00
Théophane Hufschmitt
74cc24f4cf
Merge pull request #7191 from jherland/antiquoted-paths
Explain how Nix handles antiquotation of paths
2022-10-26 12:42:59 +02:00
Guillaume Maudoux
2a7348f986 Fixup merge typo 2022-10-22 23:38:50 +02:00
Patrick Jackson
b44df13701 manual: update options generation code to use default values 2022-10-20 12:05:04 -07:00
Johan Herland
1ec8810687 Explain how Nix handles antiquotation of paths
Specifically, explain why Nix does not _re_evaluate paths during a
`nix repl` session. This is a thing that bit me while playing around
with paths and antiquotation in `nix repl` while reading the Nix
language tutorial at https://nix.dev/tutorials/nix-language.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-10-19 11:50:58 +02:00
Guillaume Maudoux
3f9f6ae127 Merge remote-tracking branch 'origin/master' into coerce-string 2022-10-16 20:39:19 +02:00
Ana Hobden
069409d167 Print common flags in --help 2022-10-07 09:07:22 -07:00
Valentin Gagarin
ac0fb38e8a
Merge pull request #6652 from abathur/doc_install_tests 2022-10-05 17:45:42 +02:00
Travis A. Everett
e1418430ac
Apply suggestions from code review
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-10-05 09:52:53 -05:00
Valentin Gagarin
927234cfb2
Merge pull request #6870 from amjoseph-nixpkgs/pr/doc/explain-local-remote-binary-substituter 2022-10-05 09:01:42 +02:00
Théophane Hufschmitt
3ae9467d57
Merge pull request #6969 from fricklerhandwerk/refactor-generate-manpage
refactor rendering command documentation to markdown
2022-10-03 15:50:17 +02:00
Valentin Gagarin
d8bef7358f bring back lost newline 2022-09-30 01:43:57 +02:00
Valentin Gagarin
70eea97742 use more self-explanatory names 2022-09-30 01:43:57 +02:00
Valentin Gagarin
61188cb820 move final template to the top
this allows readers to enter the code starting with what is visible from
the outside, instead of working themselves up from purely technical details.
2022-09-30 01:43:57 +02:00
Valentin Gagarin
0e0f1832de remove superfluous let-in pair 2022-09-30 01:43:57 +02:00
Valentin Gagarin
a85df04fcb refactor showOptions
it was quite a pain to manipulate strings just with `builtins`
2022-09-30 01:43:53 +02:00
Valentin Gagarin
4655563470 refactor rendering command documentation to markdown
idea:
- make document structure visible, like in a template
- order functions by descending abstraction
- avoid nested let bindings
2022-09-30 01:42:46 +02:00
Valentin Gagarin
6b56bb4a79 use indented strings where appropriate 2022-09-30 01:42:46 +02:00
Solene Rapenne
847cd49909 nix-copy-closure: improve wording 2022-09-28 01:05:46 +02:00
Théophane Hufschmitt
6a64820cb4
Merge pull request #7082 from rapenne-s/ccache
add ccacheStdenv
2022-09-24 12:45:27 +02:00
Solène Rapenne
e04b38f789 add ccacheStdenv
when using ccache, rebuild time has been measured
89% faster while not slowing the speed of cold builds
2022-09-23 11:21:19 +02:00
Travis A. Everett
84bdb0e3ad address review feedback
Mainly:
- Try to triangulate between narrative that framed this as
  a new/easy process and the need for a reference that will
  not quickly grow stale.
- Fix a ~continuity issue where the text was talking about
  "your Cachix cache" before saying that you'd need to make
  a Cachix cache to enable the installer tests.
- Adopt suggestion on titling, and nest subtitles in the
  installer test section.
2022-09-18 13:02:42 -05:00
Travis A. Everett
4bd52bf6c4
Apply suggestions from code review
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-09-17 13:20:11 -05:00
Adam Joseph
ad5b09423a release-notes/rl-next.md: note new argument to fetchurl.nix 2022-09-16 01:59:24 -07:00
Valentin Gagarin
dc8c0b173c
Update doc/manual/src/contributing/hacking.md 2022-09-16 09:36:55 +02:00
Valentin Gagarin
1ae974120a
Update doc/manual/src/contributing/hacking.md 2022-09-16 09:36:37 +02:00
Valentin Gagarin
0a4bd9fe88
Update doc/manual/src/contributing/hacking.md 2022-09-16 09:36:30 +02:00
Valentin Gagarin
47fa1087c8
Update doc/manual/src/contributing/hacking.md 2022-09-16 09:36:20 +02:00
Valentin Gagarin
1d295e5fe7
Merge pull request #6934 from fricklerhandwerk/revert-architecture
Revert #6420 "Document what Nix *is*" so we can start over with smaller change sets
2022-09-09 13:31:05 +02:00
Valentin Gagarin
8dd5ba2f47 more precise variable types 2022-09-09 09:54:24 +02:00
Valentin Gagarin
548c904d40 optimize performance
remove loops and function calls, modify arrays in place

this makes the whole thing harder to read, and probably only
marginally faster.
2022-09-08 11:58:43 +02:00
Guillaume Maudoux
eb460a9529 WIP: broken merge but need a git checkpoint 2022-09-07 00:34:03 +02:00
Valentin Gagarin
59be1e500a generalize anchor redirects
renaming section headers and changing manually set `id`s will break URLs
in the wild.

this change allows keeping track of all changes to ensure backwards
compatibility.
2022-09-06 00:49:16 +02:00
Adam Joseph
e90f2fcfc7 glossary: add entry for chroot store (used 11 times in nix) 2022-09-01 18:28:05 -07:00
Adam Joseph
e6f5352e71 #binary-cache -> #gloss-binary-cache 2022-09-01 18:27:00 -07:00
Adam Joseph
59dc8346ca move substituter signature-checking conditions to configuration file documentation 2022-09-01 17:51:56 -07:00
Adam Joseph
f6c750e8b2 glossary: remove extraneous comma 2022-09-01 17:48:34 -07:00
Adam Joseph
887e922be2 glossary: outputHash, not __outputHash 2022-09-01 17:47:13 -07:00
Adam Joseph
d5e064d816 glossary: fix broken link 2022-09-01 17:46:31 -07:00
Adam Joseph
57f12df5e4 input-addressed store object: include FODOs 2022-09-01 15:09:10 -07:00
Adam Joseph
8139bbe2ba implement https://github.com/NixOS/nix/pull/6870#pullrequestreview-1093700220 2022-09-01 15:01:07 -07:00
Adam Joseph
def4fb9a0f __outputHash: add link 2022-09-01 14:47:33 -07:00
Adam Joseph
1b2b8c39fd fix link to language/advanced-attributes.md#adv-attr-contentAddressed 2022-09-01 14:47:17 -07:00
Adam Joseph
0a98d564b3 glossary: resolve FIXME in #gloss-fixed-output-derivation 2022-09-01 14:41:27 -07:00
Adam Joseph
1f56b5d772 doc/manual: un-inline definitions from substitute 2022-09-01 14:13:21 -07:00
Adam Joseph
41153f30bd glossary: substituter: merge output-addressed cases 2022-09-01 14:13:21 -07:00
Adam Joseph
9cb8412143
Update doc/manual/src/glossary.md
Co-authored-by: John Ericson <git@JohnEricson.me>
2022-09-01 20:41:04 +00:00
Adam Joseph
2812682ebe
Update doc/manual/src/glossary.md
Co-authored-by: John Ericson <git@JohnEricson.me>
2022-09-01 20:40:39 +00:00
Adam Joseph
520587b9a0 glossary: local store: clarify 2022-09-01 13:39:48 -07:00
Valentin Gagarin
f35b3aa47b do not use unwarranted pkgs in example 2022-08-31 09:16:37 +02:00
Eelco Dolstra
1f2b12b30e
Merge pull request #6968 from fricklerhandwerk/man-no-weblinks
do not render relative links in help pages
2022-08-29 08:46:35 +02:00
Valentin Gagarin
e7dcacbd7c do not render relative links in help pages
this simplifies the setup a lot, and avoids weird looking `./file.md`
links showing up.

it also does not show regular URLs any more. currently the command
reference only has few of them, and not showing them in the offline
documentation is hopefully not a big deal.

instead of building more special-case solutions, clumsily preprocessing
the input, or issuing verbal rules on dealing with URLs, should better
be solved sustainably by not rendering relative links in `lowdown`:

https://github.com/kristapsdz/lowdown/issues/105
2022-08-26 17:10:41 +02:00
Eelco Dolstra
b0488a29dc Branch 2.11 release notes 2022-08-24 22:44:58 +02:00
Eelco Dolstra
04e74f7c8b
Merge pull request #6612 from NixOS/parallel-nix-copy
Make nix copy parallel again
2022-08-24 15:31:42 +02:00
Eelco Dolstra
4c96761c2b Merge remote-tracking branch 'origin/master' into parallel-nix-copy 2022-08-22 15:29:10 +02:00
Valentin Gagarin
d8e54d19f7 Revert "Merge pull request #6420 from nix-community/doc-what-is-nix"
This reverts commit 81e101345f, reversing
changes made to 7d1280bbaf.
2022-08-22 12:52:15 +02:00
Andrei Boar
50f5b6c733
Update doc/manual/src/command-ref/env-common.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-08-19 12:28:51 +03:00
Andrei Boar
82b867d0b5 cover empty string case 2022-08-19 11:51:32 +03:00
Valentin Gagarin
703b335c1d reword description of language properties
the list style is supposed to give more structure.
each property is explained as concisely as possible while trying not to
sound too fancy.
2022-08-15 11:34:39 +02:00
Valentin Gagarin
71e9c28694 reword introduction to overview 2022-08-15 11:15:03 +02:00
Valentin Gagarin
bc315326fa fix whitespace to please markdown
keep some indentation to ease source readability
2022-08-15 11:13:05 +02:00
Valentin Gagarin
6ba8d6dc82 add more examples on string interpolation 2022-08-15 11:06:40 +02:00
Valentin Gagarin
c209e6e108 add more list examples 2022-08-15 10:18:56 +02:00
Valentin Gagarin
0378531bf2 add curried function 2022-08-15 10:18:56 +02:00
Valentin Gagarin
2e4704ca93 add second @ pattern example 2022-08-15 10:18:56 +02:00
Valentin Gagarin
5c25bdee50 add null 2022-08-15 10:18:56 +02:00
Valentin Gagarin
391fd10b12 add home path 2022-08-15 10:18:56 +02:00
Valentin Gagarin
587ae9ada5 add search path 2022-08-15 10:18:56 +02:00
Valentin Gagarin
21438acc70 add absolute path 2022-08-15 10:18:56 +02:00
Valentin Gagarin
e6f7c180de add floating point number 2022-08-15 10:18:56 +02:00
Valentin Gagarin
292cab039d add multi-line string 2022-08-15 10:18:56 +02:00
Valentin Gagarin
f165a8ae08 flarify relative path semantics 2022-08-15 10:18:56 +02:00
Valentin Gagarin
43188d3d18 make hash and version distinguishable as placeholder 2022-08-15 10:18:56 +02:00
Valentin Gagarin
90836397d3 remove stale section link 2022-08-15 10:18:56 +02:00
Valentin Gagarin
3378a3bce8 add syntax overview from NixOS manual
taken verbatim to keep track of required corrections.

made it an HTML table to more easily change structure and keep diffs
minimal.
2022-08-15 10:18:56 +02:00
Eelco Dolstra
af4e8b00fb
Merge pull request #6882 from DeterminateSystems/allow-multi-user-as-root
Allow installing multi-user as root on macOS and Linux
2022-08-12 10:19:03 +02:00
Graham Christensen
7bb1e913b3 Don't prompt about using sudo if we're already root 2022-08-10 09:37:08 -04:00
Graham Christensen
88a0f3b6ba Strip whitespace in installing-binary.md 2022-08-10 09:37:08 -04:00
Adam Joseph
bac1e1bf8c
Update doc/manual/src/glossary.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-08-08 17:52:31 +00:00
Travis A. Everett
9b7bd2dd1f
Apply suggestions from code review
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-08-08 10:04:27 -05:00
Travis A. Everett
b5d85f0922
Apply suggestions from code review
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-08-05 13:49:18 -05:00
Adam Joseph
1d3b92e80c move package-management/terminology into glossary.md 2022-08-05 10:39:43 -07:00
Adam Joseph
4de95f7f56 gesture at explanation of why binary caches exist 2022-08-05 10:33:48 -07:00
Adam Joseph
d5506aa712
Update doc/manual/src/package-management/terminology.md
Co-authored-by: Attila Gulyas <toraritte@gmail.com>
2022-08-05 17:19:52 +00:00
Adam Joseph
66a93a76b9
Update doc/manual/src/package-management/terminology.md
Co-authored-by: Attila Gulyas <toraritte@gmail.com>
2022-08-05 17:15:37 +00:00
Adam Joseph
2eb74c918d derivations do not need to be signed 2022-08-05 10:13:41 -07:00
Adam Joseph
aae771cad2 !implement https://github.com/NixOS/nix/pull/6870#discussion_r938912244 2022-08-05 10:12:46 -07:00
Eelco Dolstra
4eb566603a
Comment out the architecture section
This needs more review and probably should be a separate book.
2022-08-05 11:01:40 +02:00
Adam Joseph
1b97f3872e !fixup: transposed characters 2022-08-04 14:22:14 -07:00
Adam Joseph
62674659ed !fixup capitalize Nix 2022-08-04 14:21:17 -07:00
Adam Joseph
8f44d24c52 !fixup whitespace 2022-08-04 14:19:25 -07:00
Adam Joseph
56d4fc194b fourth trust condition: FODs 2022-08-04 14:14:24 -07:00
Adam Joseph
a5be5e0120 doc/manual: define {local,remote} store, binary cache, substituter
Nix veterans intuitively know what the following terms mean.  They are
used in several places in the nix documentation, but never defined:

- local store
- remote store
- binary cache
- substituter

In particular, I found the last two terms to be confusingly similar.
Let's give definitions for them.
2022-08-04 14:07:06 -07:00
John Ericson
39d32ac4c6 Add disclaimer that arch section is WIP and links may rot
So we can iterate without worrying so much.
2022-08-04 14:02:58 -04:00
John Ericson
6f6498f59c Remove header fragments which is not needd 2022-08-04 14:02:38 -04:00
John Ericson
016d7a8f78 Fix rosetta stone file name 2022-08-04 14:02:19 -04:00
John Ericson
b430a6743c Remove sections within from SUMMARY 2022-08-04 14:01:55 -04:00
Andrei Boar
1c2c1a6e00
Update doc/manual/src/command-ref/env-common.md
Co-authored-by: Jan Tojnar <jtojnar@gmail.com>
2022-08-04 16:17:24 +03:00
John Ericson
bc118854d0 Merge remote-tracking branch 'upstream/master' into doc-what-is-nix 2022-08-04 09:11:42 -04:00
Andrei Boar
a8ac6a4120
Update doc/manual/src/command-ref/env-common.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-08-04 16:01:02 +03:00
Andrei Boar
cedcfe861c Merge branch 'manual-nix-path-empty' of github.com:zuzuleinen/nix into manual-nix-path-empty 2022-08-04 15:56:13 +03:00
Andrei Boar
f72545e864 update to suggested changes 2022-08-04 15:56:01 +03:00
Valentin Gagarin
b631742277 fix page rendering
apparently it is not possible to link to page anchors with `mdBook`[1]

[1]: https://github.com/rust-lang/mdBook/issues/167
2022-08-04 14:31:33 +02:00
Domen Kožar
7d1280bbaf
Merge pull request #6678 from abathur/update_darwin_uninstall
doc: update darwin uninstall instructions
2022-08-04 14:09:09 +02:00
Andrei Boar
6dfd8a78d9
Update doc/manual/src/command-ref/env-common.md
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-08-04 15:04:52 +03:00
Valentin Gagarin
cc3a5f4ba2 use correct mdBook syntax for callouts 2022-08-04 14:04:14 +02:00
Valentin Gagarin
8cec32e7f5 fix directory tree renderings 2022-08-04 13:51:35 +02:00
Domen Kožar
84a26882f8
Update doc/manual/src/installation/installing-binary.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-08-04 06:23:45 -05:00
Domen Kožar
3c2de2da01
Update doc/manual/src/installation/installing-binary.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-08-04 06:23:36 -05:00
Andrei Boar
5a75aa8595 manual: update docs when NIX_PATH is empty 2022-08-04 14:19:51 +03:00
Valentin Gagarin
3df1ee2ba5 clarify what explicitly declaring certain dependencies means 2022-08-04 12:37:48 +02:00
Valentin Gagarin
b7309ce624 move architecture to the end 2022-08-04 12:37:48 +02:00
Valentin Gagarin
00a7eaed67 add file system object to table of contents 2022-08-04 12:37:48 +02:00
Valentin Gagarin
db6faf44a9 clarify what store objects can be
the store of course makes a distinction, but that is not relevant here
2022-08-04 12:37:48 +02:00
Valentin Gagarin
0228eb8ae7 add Java example on manual dependency declaration 2022-08-04 12:37:48 +02:00
Valentin Gagarin
29c062537d hashes: truncate -> reduce, mention SHA-256
the longer SHA-256 hashes are not truncated, but in fact processed.

Co-authored-by: Thomas <twatson52@mac.com>
2022-08-04 12:37:48 +02:00
Valentin Gagarin
9cabba1fc3 mention hard links
Co-authored-by: Thomas <twatson52@mac.com>
2022-08-04 12:37:48 +02:00
Valentin Gagarin
bac86231ad use "build plan" consistently 2022-08-04 12:37:47 +02:00
Valentin Gagarin
5a5a95696f note customized base32
Nix omits E O U T characters for some reason.
2022-08-04 12:37:47 +02:00
Valentin Gagarin
de5dea45f7 use correct Nix entity
Nix itself does care a lot about what type of store object you have.
2022-08-04 12:37:47 +02:00
Valentin Gagarin
fe4c0b8d75 fix typo
Co-authored-by: Thomas <twatson52@mac.com>
2022-08-04 12:37:47 +02:00
Valentin Gagarin
def80d5777 add subsections to table of contents 2022-08-04 12:37:47 +02:00
Valentin Gagarin
c345345dee concept map: align hights
this has the weird but nice emergent property that terms at the same
height are roughly at the same level of abstraction.
2022-08-04 12:37:47 +02:00
Valentin Gagarin
a28d6878b2 concept map: put closure as it is in the chapter
this is not as compact any more, but it more closely resembles the
chapter structure, and clearly shows that the closure property is the
key idea on which most of Nix operates.
2022-08-04 12:37:47 +02:00
Valentin Gagarin
475a332025 make concept map even more compact 2022-08-04 12:37:47 +02:00
Valentin Gagarin
d8b2f9f772 make concept map more compact
invert arrows to/from derivation:
- we need closures to form derivations
- we need derivations to perform builds
2022-08-04 12:37:47 +02:00
Valentin Gagarin
348432f48f store: add concept map
this should help nativate the chapter by indicating which terms should
be known to understand a given concept.
2022-08-04 12:37:47 +02:00
Valentin Gagarin
ec43977553 store: match chapter introduction to outline
the various levels of detail should describe the same things.
2022-08-04 12:37:47 +02:00
Valentin Gagarin
7c656d90ca simplify description of diagram
try not to be too fancy, it's just for reading the diagram out loud.
2022-08-04 12:37:47 +02:00
Valentin Gagarin
631ca18ee6 reword notes on copying
clarify that we are copying between different stores. we have not
introduced that notion or why it would be interesting, but for now it
should be fine to keep it in context of the store directory.

we could move that later to a more detailed explanation of different
store types.
2022-08-04 12:37:47 +02:00
Valentin Gagarin
c10dcccccd make example a simple list
using JSON notation is unwarranted and not explained.
2022-08-04 12:37:47 +02:00
Valentin Gagarin
9c544813d7 paths -> path
use singular for terminology uniformly
2022-08-04 12:37:47 +02:00
Valentin Gagarin
1681f4e9f3 better explain reference scanning 2022-08-04 12:37:47 +02:00
Valentin Gagarin
fa7ad4593d explain store directory 2022-08-04 12:37:47 +02:00
Valentin Gagarin
f632816cba add explanation and examples of file system objects 2022-08-04 12:37:47 +02:00
Valentin Gagarin
84ddfbf8fd remove diagonal from operations diagram 2022-08-04 12:37:47 +02:00
Valentin Gagarin
93f721b0d2 remove draft on derivations 2022-08-04 12:37:47 +02:00
Valentin Gagarin
19d8a5d839 move first mention of file system object before diagram 2022-08-04 12:37:47 +02:00
Valentin Gagarin
a90fc62b61 make clear that file system is for processes
Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2022-08-04 12:37:47 +02:00
Valentin Gagarin
7993ba1f38 constrain garbage collection scope
garbage collection is now incremental, and may (in theory) never delete all unreferenced objects if it is slow enough.
2022-08-04 12:37:47 +02:00
Valentin Gagarin
195aa28ff7 references are added according to build task
at this level of abstraction we do not really care about build instructions or what they are, and also build instructions including their arguments really amount to the build task.
2022-08-04 12:37:47 +02:00
Valentin Gagarin
80de4a4804 operations diagram: store' to the right
this also looks more diverse, hopefully easier to distinguish

Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2022-08-04 12:37:47 +02:00
Valentin Gagarin
3794618cce add commas between output values 2022-08-04 12:37:47 +02:00