Commit graph

1897 commits

Author SHA1 Message Date
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
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
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