aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/src/command-ref
AgeCommit message (Collapse)Author
2024-08-18doc: fix broken meson deps for various manuals outputsJade Lovelace
This is incredibly haunted, but it can happen that you change libutil, breaking the generation of the .json files, which then does not rebuild the files. I don't expect they are slow to build, so it does not seem so bad to just rebuild them every time instead of extracting a list of all the possible deps. We want to delete this nonsense anyway and replace it with generated code. Change-Id: Ia576d1a3bdee48fbaefbb5ac194354428d179a84
2024-08-17libexpr: Introduce Deprecated featurespiegames
They are like experimental features, but opt-in instead of opt-out. They will allow us to gracefully remove language features. See #437 Change-Id: I9ca04cc48e6926750c4d622c2b229b25cc142c42
2024-06-22libmain: add progress bar with multiple status linesFinn Behrens
Add the log-formats `multiline` and `multiline-with-logs` which offer multiple current active building status lines. Change-Id: Idd8afe62f8591b5d8b70e258c5cefa09be4cab03
2024-05-23docs: linkify nix3-build mention in nix-build.mdQyriad
Change-Id: I462a8cf0da42b5045ce84b48dc1841ecdccbb89e
2024-05-05Fix the pages in the manual for LixJade Lovelace
This doesn't comprehensively fix everything outdated in the manual, or make the manual greatly better, but it does note down where at least jade noticed it was wrong, and it does fix all the instances of referencing Nix to conform to the style guide to the best of our ability. A lot of things have been commented out for being wrong, and there are three types of FIXME introduced: - FIXME(Lix): generically Lix needs to fix it - FIXME(Qyriad): re https://git.lix.systems/lix-project/lix/issues/215 - FIXME(meson): docs got outdated by meson changes and need rewriting I did fix a bunch of it that I could, but there could certainly be mistakes and this is definitely just an incremental improvement. Fixes: https://git.lix.systems/lix-project/lix/issues/266 Change-Id: I5993c4603d7f026a887089fce77db08394362135
2024-05-03Rename `nix show-config` to `nix config show`Théophane Hufschmitt
Part of #7672 My main motivation is to be able to use `nix.checkConfig`[1]. This doesn't work with Lix currently since the module uses `nix show-config` if the Nix version is <2.20pre and `nix config show` otherwise. I think this is the only instance where nixpkgs checks for which Nix commands exist that affects us now, so I figured we could just perform the rename here as well[2] and still provide the current version number[3]. I don't have a strong opinion on whether to deprecate `nix show-config`, the warning is added there automatically. (cherry picked from commit f300e11b056dea414d7d77bbc6e5a7dc5d9ddd41) [1] https://nixos.org/manual/nixos/stable/options.html#opt-nix.checkConfig [2] I should add that I don't use the "official" ways of installing Lix because using the flake directly and callPackaging it seemed to fit better into my workflow: I already have a little mess to make sure Hydra from the flake uses the correct pkgs.nix and I didn't want to complicate it further while keeping a single package-set I can build in CI. Don't get me wrong, I think such a module for a quick-start is very important, just giving context on why I bother in the first place :) [3] When we go public, I think it's worth considering to add support in nixpkgs itself for Lix. Change-Id: I47b4239b05cbeda3c370d2fa56ea768b768768ac
2024-04-26docs(nix-env): summarize of each subcommand in --helpQyriad
This should have been there from the beginning. As much as nix-env is a pile of problems we don't need trivial docs papercuts like this adding to it. Change-Id: I0c53e4b146af2fefdd0e4743d850672729cb2194
2024-04-11manual: build docs with dummy envseldritch horrors
this was previously used because the macOS docs build would otherwise pull files out of the host nix store. or something. not sure about it Change-Id: I76b51eac1ebc5de5f00e2e4be086dd8db3eeb8e6
2024-04-11docs: redo content generation for mdbook and manualeldritch horrors
manpages can be rendered using the markdown output of mdbook, the rest of the manual can generated out of the main doc/manual source tree. we still use lowdown to actually render manpages instead of eg mdbook-man because lowdown does generate reasonably good manpages (though that is also somewhat debatable, but they're a lot better than mdbook-man). doing this not only lets us drastically simplify the lowdown pipeline, but also remove all custom {{#include}} handling since now mdbook does all of it, even for the manpage builds. even the lowdown wrapper isn't entirely necessary because lowdown can take all wrapper arguments with command line flags rather than bits of input file content. This also implements running mdbook in Meson, in order to generate the manpages. The mdbook outputs are also installed in the usual location. Co-authored-by: Qyriad <qyriad@qyriad.me> Change-Id: I60193f9fd0f15d48872f071af35855cda2a0f40b
2024-04-09docs: remove many link-to-selfeldritch horrors
for some reason these three were anchors, not links, but had they been links they wouldn't've worked because they're not defined anywhere but here. in the print version of the manual they're duplicated many times over (creating id collisions), so we should better remove them anyway. Change-Id: I8988a7c32c812dee0f0b6d4953faa7cd1255228d
2024-04-04Revert "meson: move nix3 manpage generation into command-ref/"Qyriad
This reverts commit 70954233743a233744787103d3211237a28ddbca. This seems to have broken running ninja on warm build directories, which is not what we want. Reverted until we figure out something better Change-Id: I9623ae078917e7c59a930bf8044a216501d4bb20
2024-04-03meson: move nix3 manpage generation into command-ref/Qyriad
This puts the generated files where they are for the make system. This is in preparation for further meson-mdbook stuff. Change-Id: I934df6854a80af5ccf381cf1da0bda0187a8bcfc
2024-03-29Add `pre-commit` checksRebecca Turner
The big ones here are `trim-trailing-whitespace` and `end-of-file-fixer` (which makes sure that every file ends with exactly one newline character). Change-Id: Idca73b640883188f068f9903e013cf0d82aa1123
2024-03-09Merge pull request #9755 from 9999years/printer-followupeldritch horrors
Printer followup (cherry picked from commit 51f524c629b778b75cb62a9e0c85bae655984abc) Change-Id: I29214cc86c5e846cbcfec382022293a70011b316
2024-03-09Unify and refactor value printingeldritch horrors
Previously, there were two mostly-identical value printers -- one in `libexpr/eval.cc` (which didn't force values) and one in `libcmd/repl.cc` (which did force values and also printed ANSI color codes). This PR unifies both of these printers into `print.cc` and provides a `PrintOptions` struct for controlling the output, which allows for toggling whether values are forced, whether repeated values are tracked, and whether ANSI color codes are displayed. Additionally, `PrintOptions` allows tuning the maximum number of attributes, list items, and bytes in a string that will be displayed; this makes it ideal for contexts where printing too much output (e.g. all of Nixpkgs) is distracting. (As requested by @roberth in https://github.com/NixOS/nix/pull/9554#issuecomment-1845095735) Please read the tests for example output. Future work: - It would be nice to provide this function as a builtin, perhaps `builtins.toStringDebug` -- a printing function that never fails would be useful when debugging Nix code. - It would be nice to support customizing `PrintOptions` members on the command line, e.g. `--option to-string-max-attrs 1000`. (cherry picked from commit 0fa08b451682fb3311fe58112ff05c4fe5bee3a4, ) === Restore ambiguous value printer for `nix-instantiate` The Nix team has requested that this output format remain unchanged. I've added a warning to the man page explaining that `nix-instantiate --eval` output will not parse correctly in many situations. (cherry picked from commit df84dd4d8dd3fd6381ac2ca3064432ab31a16b79) Change-Id: I7cca6b4b53cd0642f2d49af657d5676a8554c9f8
2024-03-04Merge pull request #8470 from ncfavier/shebang-single-quoteseldritch horrors
nix-shell: support single quotes in shebangs, fix whitespace parsing (cherry picked from commit 3b99c6291377cbd22607896af9dfafa857d2f2dc) Change-Id: I2a431b21c3467eefa1ef95d5a36d672f45b6937a
2024-03-04Merge pull request #8931 from fricklerhandwerk/nix3-config-optionsThéophane Hufschmitt
do not show configuration override flags for each command (cherry picked from commit f89b84919c1a5c796512c50311821e7779b3678b) Change-Id: Ib98b739bd6c9a1e94f94a78a47d84d72e435e7c0
2023-09-09docs: fixed the default priority of nix-env --install (#8945)Emil Nikolov
2023-09-06dedent common options listing; one sentence per lineValentin Gagarin
this is a pure reformatting, contents were not changed one sentence per line makes reviewing diffs and making suggestions much more convenient. the indentation was an artifat of the DocBook migration.
2023-09-05Merge pull request #7592 from fricklerhandwerk/nix-store-realiseValentin Gagarin
reword description of how realisation works
2023-09-01Merge branch 'master' into valid_deriver_2Eelco Dolstra
2023-08-31revert some random changeValentin Gagarin
2023-08-31make description open-ended, add TODOValentin Gagarin
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-08-31don't invent terms yetValentin Gagarin
2023-08-31more meaningful taglineValentin Gagarin
2023-08-31accommodate "do nothing" branchValentin Gagarin
2023-08-31be more precise about substituting store derivationsValentin Gagarin
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-08-31add anchor to `builder`Valentin Gagarin
2023-08-31add reference linkValentin Gagarin
2023-08-31remove abstract descriptionValentin Gagarin
2023-08-31reword introductory sentenceValentin Gagarin
2023-08-31remove superfluous wordValentin Gagarin
2023-08-31reword description of how realisation worksValentin Gagarin
2023-08-28Document nix-prefetch-url defaults (#8878)Silvan Mosberger
2023-08-24add nix-store --query --valid-derivers commandGuillaume Girol
notably useful when nix-store --query --deriver returns a non-existing path. Co-authored-by: Felix Uhl <iFreilicht@users.noreply.github.com>
2023-07-19list moving parts of channelsValentin Gagarin
2023-07-19revert channel files overviewValentin Gagarin
2023-07-19remove redundant information from channel profile descriptionValentin Gagarin
2023-07-19remove the Channels sectionValentin Gagarin
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-06-22Better document build failure exit codesJohn Ericson
- 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-21Clarify docs on deleting generations, including fixing a mistakeJohn Ericson
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-20clarify setting options on the command lineValentin Gagarin
2023-06-20clarify read order for configuration settingsValentin Gagarin
2023-06-20split configuration file page into sectionsfricklerhandwerk
this makes it easier to scan for specific information, such as the format of command line flags
2023-06-20add links to environment variables documentationfricklerhandwerk
2023-06-19Add more links in nix-build documentation (#8545)Silvan Mosberger
* Add more links in nix-build documentation Co-authored-by: John Ericson <git@JohnEricson.me>
2023-06-14Improve `nix-collect-garbage` docsJohn Ericson
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-06-14Improve `nix-env --delete-generations` docsJohn Ericson
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-06-02Add nix-channel --list-generationsShamrock Lee
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-05-17Merge pull request #8337 from fricklerhandwerk/channel-filesJohn Ericson
list files used by `nix-channel` on its own man page