Commit graph

74 commits

Author SHA1 Message Date
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
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
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
Felix Uhl dc4aa383e9 doc: fix anchor links in and to glossary 2023-01-24 00:19:43 +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
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 e79f935718 doc/manual: Fix broken internal links
The targets I could find.
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
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
Valentin Gagarin 7797661a70 link "store derivation" to glossary definition 2022-12-21 11:42:50 +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
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 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 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 703d863a48 Trivial changes from the lazy-trees branch 2022-12-07 14:06:34 +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
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
Solene Rapenne 847cd49909 nix-copy-closure: improve wording 2022-09-28 01:05:46 +02:00
Valentin Gagarin 499ed26508 manual: remove "Writing Nix Expressions" chapter
it is out of date, all over the place in level of detail, is really
about `nixpkgs`, and in general instructions should not be part of
a reference manual.

also:
- update redirects and internal links
- use "Nix language" consistently
2022-08-04 11:59:25 +02:00
laalsaas eac211a171 Fix logical and typographical errors in nix-env man page 2022-07-10 12:30:17 +02:00
Hugo Osvaldo Barrera fd7f795750 Add disambiguation to man page
This should help future lost newcomers like myself understand where to
find the docs for both of these commands and how they differ.
2022-06-14 18:13:35 +02:00
Eelco Dolstra d67a2ae52d
Merge branch 'doc-redirects' of https://github.com/jtojnar/nix 2022-05-27 11:12:41 +02:00
Jan Tojnar a793863b97 doc: Manually insert some anchors 2022-05-26 18:17:21 +02:00
Jan Tojnar 7708a34a51 doc: Add anchors to long lists
Added using the following sed scripts:

- For command-ref/opt-common.md:

    s~- `(--?)([^`]+)`~- [`\1\2`]{#opt-\2}~g

- For expressions/builtin-constants.md:

    s~- `(builtins\.?)([^`]+)`~- [`\1\2`]{#builtins-\2}~g

- For expressions/advanced-attributes.md

    s~^  - `([^`]+)`~  - [`\1`]{#adv-attr-\1}~g

  and manually adjusted outputHashAlgo & outputHashMode.

- For glossary.md

    s~^  - (`([^`]+)`|(.+)) ?\\~  - [\1]{#gloss-\2\3}\\~g;
    s~(gloss-\w+) ~\1-~g

  and manually adjusted anchors for Nix expression, user environment, NAR, ∅ and ε.

- For command-ref/env-common.md

    s~^  - `([^`]+)`~  - [`\1`]{#env-\1}~g'
2022-05-26 18:17:21 +02:00
Eelco Dolstra 8f4548d401
Tweak IN_NIX_SHELL description 2022-05-26 12:40:01 +02:00
Théophane Hufschmitt 54f07b66c8
Precise the doc for --include-outputs
Make it explicit that it only includes the existing outputs and not the ones that haven’t been realised
2022-02-23 09:17:08 +01:00
Ross Light 7477974b93
Correct NIX_BUILD_PATH default description
Source: 067076287b/src/nix-build/nix-build.cc (L362-L381)
2022-01-21 18:45:19 -08:00
Eelco Dolstra e88fb63e28
Merge pull request #5585 from jtojnar/env-a
doc: De-emphasize nix-env without -A
2021-11-18 14:34:45 +01:00
Jan Tojnar ca4d8ce9e2 doc: De-emphasize nix-env without -A
The manual uses `nix-env -i` without `-A` prominently, teaching a bad practice to newcomers.
2021-11-17 17:04:25 +01:00
Jan Tojnar e96faadcd6 Fix XDG_CONFIG_DIRS fallback
According to XDG Base Directory Specification,
it should fall back to /etc/xdg when the env var is not present.
2021-11-17 14:31:15 +01:00
Jan Tojnar e5d4c2235f
docs: Correct fallback user config path
This is in line with XDG Base Directory Specification, where ~/.config is supposed to be used when XDG_CONFIG_HOME is unset.

It also better matches the reality, where ~/.config/nix.conf does not seem to be used.
2021-11-04 11:41:29 +01:00
Dimitris Apostolou c34cc5e488
Fix typos 2021-11-03 18:11:20 +02:00
Simon Legner 1968760f4a
command-ref/nix-shell: fix --pure, --keep 2021-11-02 22:00:08 +01:00
John Chapman ffeec5f283 Clarify that not all nix packages will use the default build phases 2021-10-17 15:24:22 +11:00
John Chapman 4cff413054 Clarify that not all nix packages will use the default build phases 2021-10-09 12:03:34 +11:00
Keshav Kini f35f9af787 Improve explanation of NIX_PATH prefix syntax
The previous wording seemed to imply that the "channel:" syntax would resolve to
a github archive URL, which is not the case.
2021-06-03 17:59:39 -07:00
Linus Heckemann a3553cdae8 doc/nix-shell: Remove outdated bashrc information
This behaviour was removed in 65f6d5db6f.
2021-05-11 14:33:35 +02:00
regnat 31313d1401 Replace the trailing markdown spaces by a backslash
They are equivalent according to
<https://spec.commonmark.org/0.29/#hard-line-breaks>,
and the trailing spaces tend to be a pain (because the make git
complain, editors tend to want to remove them − the `.editorconfig`
actually specifies that − etc..).
2021-04-23 14:37:21 +02:00
Eelco Dolstra 4638bcfb2c Fix some typos
Fixes #4671.
2021-03-26 16:14:38 +01:00
Travis A. Everett ac8ba2eae4
remove doc for obsolete --no-build-hook flag
`--no-build-hook` appears to have been removed in 25f32625e2
2021-03-06 19:51:29 -06:00
Mauricio Scheffer 5f4701e70d
Update doc/manual/src/command-ref/nix-shell.md
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2021-02-16 23:27:04 +00:00
Mauricio Scheffer 35129884f9
Fix Haskell example
http://nixos.org redirects to https://nixos.org and apparently the HTTP library doesn't follow the redirect, so the output is empty.
When defining https in the request it crashes because the library doesn't seem to support https.
So this switches the example to a different http library.
2021-02-16 23:19:42 +00:00
Eelco Dolstra 77c9ceda4b Tweak 2021-01-11 19:42:24 +01:00
Eelco Dolstra a3a22bd804
Merge pull request #4202 from hercules-ci/nix-shell-doc
Nix shell doc
2020-10-30 11:36:24 +01:00
Robert Hensing d4c5d8d32a nix-shell.md: Extend shellHook example 2020-10-30 11:12:28 +01:00
Robert Hensing b809c48ebb nix-shell.md: evaluated -> run
Use "run" to avoid confusion with Nix evaluation.
"evaluated" was intended to reference bash eval but it's ambiguous.
2020-10-30 11:01:33 +01:00
Eelco Dolstra ff4dea63c9 Generalize extra-* settings
This removes the extra-substituters and extra-sandbox-paths settings
and instead makes every array setting extensible by setting
"extra-<name> = <value>" in the configuration file or passing
"--<name> <value>" on the command line.
2020-10-29 18:17:39 +01:00