1
0
Fork 0
mirror of https://github.com/NixOS/nix.dev.git synced 2024-10-18 14:32:43 -04:00
Commit graph

595 commits

Author SHA1 Message Date
Zach Mitchell, PhD 808ac3b3ce Update source/tutorials/reproducible-scripts.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-07-27 08:59:32 -06:00
Zach Mitchell, PhD 64348ea907 Update source/tutorials/reproducible-scripts.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-07-27 08:59:32 -06:00
Alper Cugun 56ba5bda03 Explain what this construct is
> The chained script interpreter to be invoked

Chained is mentioned here but then also forgotten about: https://nixos.org/manual/nix/unstable/command-ref/nix-shell.html

Mostly it's unclear here why there are multiple weird hashbang lines there that are the same.

Also it's not great that here an entirely new construct is introduced that probably nobody will have ever seen before and to understand what it does you have to go to several different off-site documentation pages.

Can this be rewritten to be more standalone?
2023-07-27 08:59:32 -06:00
Silvan Mosberger 395ae61d71
Merge pull request #659 from henrik-ch/fix-non-NixOS
small touch-up - removing non-NixOS referral
2023-07-27 16:06:51 +02:00
Tanner Wilcox 678d749e04
Update ad-hoc-shell-environments.md (#661)
Typo fix
2023-07-24 08:35:46 +01:00
Henrik 27ec931631
Update installing-nixos-on-a-raspberry-pi.md
removing non-NixOS reference
2023-07-21 19:30:39 +01:00
Jaime Terreu fd3494bee8
Fix small typo (#658)
Co-authored-by: Jaime Terreu <jaime@Jaimes-MacBook-Pro.local>
2023-07-21 16:25:00 +02:00
i97henka a0c388342e adding note about using etcher when on non-nixos system. 2023-07-20 18:21:23 +01:00
Carlos Marques f281829318
fix mismatching file name in example (#655) 2023-07-20 17:59:43 +02:00
John Bowdre 21abf7b6ad
Fix typo in ad-hoc-shell-environments.md (#652)
Footnote 2: 'packges' -> 'packages'
2023-07-19 16:25:07 +01:00
Brent Gervais d93129b5ba
correct dd command, removing .zst from if=*.img.zst
the command to image the SD card included `if=nixos-sd-image-......img.zst` though the intention here is to write the non-compressed image to the SD, not the compressed zst image.

.img.zst > .img

As written this command would not function as intended.
2023-07-16 09:45:57 -06:00
Valentin Gagarin b4628cdd04
Remove "reproducible" from glossary (#646)
* Remove "reproducible" from glossary

It is not part of the official terminology the nixos documentation team established in https://github.com/NixOS/nix.dev/pull/263.

It was mixed in https://github.com/NixOS/nix.dev/pull/380 and messed up the official status of the terms. This change fixes that!

It can be added again when we figured out what we mean by it (https://github.com/NixOS/nix.dev/issues/464).

---------

Co-authored-by: davidak <davidak@users.noreply.github.com>
2023-07-13 21:33:29 +02:00
Valentin Gagarin 1fce49476d
Merge pull request #609 from NixOS/language-tutorial-title
Nix language tutorial: restructure introduction
2023-07-13 21:26:57 +02:00
Valentin Gagarin 16ffcd0651 move estimated effort after the prerequisites 2023-07-13 21:23:23 +02:00
Valentin Gagarin db1d3c8404 revert change of title
introducing a negatively connotated word is probably not a good idea.
there is some risk of inducing fear that was not there before, and the
tongue-in-cheek aspect may not come across.

the title should be unique and easy to recognise, and it was. "Reading
the Nix language" is already the title of the talk most of this is based
on, and we shouldn't reuse it
2023-07-13 21:23:23 +02:00
Valentin Gagarin 57741ca766 fix custom admonition 2023-07-13 21:23:23 +02:00
Valentin Gagarin 561ee13ffa don't use mobile wikipedia 2023-07-13 21:23:23 +02:00
Valentin Gagarin fc308c367e clarify details on name assignment
this fills a long-standing gap of not mentioning function arguments as
another form of name assignment
2023-07-13 21:23:23 +02:00
Valentin Gagarin 633a35514c shorten introduction
the allusion to the Elements of Programming[0] never really worked out

[0]: https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/6515/sicp.zip/full-text/book/book-Z-H-10.html#%_sec_1.1
2023-07-13 21:23:23 +02:00
Valentin Gagarin 8f4f1936c0 rename the Nix language tutorial
this collapses the "don't panic" section into a motivating introduction and gives
the document a more distinctive name.

this also addresses feedback stating that having "basics" in the title
may be misleading about the effort required to work through the
tutorial.
2023-07-13 21:23:23 +02:00
Zach Mitchell, PhD 09a38eeb3f
Merge branch 'master' into skeleton-workflow 2023-07-13 06:58:37 -06:00
Zach Mitchell 9a6309c492 Add learning journey contribution guidelines 2023-07-13 06:57:31 -06:00
alex 2b1a05bcc3 fix boot config, correctly enable wlan firmware, update config link 2023-07-11 16:26:53 -05:00
proofconstruction 97112eb558
Update Raspberry Pi Installing NixOS Tutorial (#641) 2023-07-10 23:09:59 +02:00
alex f8b9cae27b fix reference link 2023-06-27 12:36:54 -05:00
alex 26e61307ad reword parts of direnv section 2023-06-27 11:53:58 -05:00
alex 0ee2bc6371 add motivation & clarification to environment customization section 2023-06-27 11:47:20 -05:00
alex 9448dd1d0e reword some parts of the getting started section. some bikeshedding 2023-06-27 11:42:49 -05:00
alex c899dd4b5c actually explain why declarative environments are useful 2023-06-27 11:39:05 -05:00
alex 1476d08634 add more contextual info to introduction 2023-06-27 11:37:16 -05:00
worktheclock 81617d94cd Declarative reproducible developer environments
RITZA language edit.
2023-06-27 11:13:40 -05:00
Vladimir Panteleev 576569a9fe
Remove the nix-build line from the nixpkgs example 2023-06-27 15:08:05 +00:00
Vladimir Panteleev f8b1d46347
Apply suggestion
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-06-27 12:28:17 +00:00
Vladimir Panteleev 06328778a1
tutorials/first-steps/nix-language: Fix the nixpkgs example 2023-06-27 10:18:43 +00:00
Valentin Gagarin 1eed36a44b
add redirects for changed directory structure (#608) 2023-06-25 17:33:19 +02:00
Yuki Langley 9aaa97a8b0
Make home page cards clickable (#616) 2023-06-25 14:13:20 +02:00
i97henka 813a8ee490 making nix-direnv the default approach 2023-06-19 18:58:10 +01:00
i97henka 0773b5dc71 rebase of fzakaria pull 83 2023-06-18 10:43:38 +01:00
Valentin Gagarin 181fdc6ced
refer to Nix manual for identifier syntax (#542)
that information should not be maintained here
2023-06-08 02:19:23 +02:00
Yuki Langley 32a1c63ad9
Improve landing page (#584)
Add overview of categories, and the origin of the name Nix
2023-06-05 17:31:49 +02:00
Valentin Gagarin 53a71b0666 same statement for both laziness notes 2023-05-30 15:11:20 +02:00
Valentin Gagarin 8009e92f82 do not leave pointers to the WHNF rabbit hole
these details are for the reference manual
2023-05-30 15:11:20 +02:00
Robert Hensing 1106e43cc1 nix-language: Don't imply strict eval is a thing (nix-instantiate) 2023-05-30 15:11:20 +02:00
Robert Hensing 6518e7cd6b nix-language: Don't imply strict eval is a thing 2023-05-30 15:11:20 +02:00
Raphael Das Gupta 41ab7e1ee0
write "GitHub" with a uppercase "H" (#574) 2023-05-29 07:31:14 +01:00
eunsukimme 27cdc89c18 docs: edit tutorial command line at Nested shell sessions on Ad hoc shell environment page 2023-05-14 18:55:57 +09:00
Valentin Gagarin 43b2887c3e reword introduction to first steps tutorials
this more closely matches the current contents
2023-05-12 07:38:06 +02:00
Valentin Gagarin ac5b6c2a41
clarify notes on reading files
placeholders were referred to before showing the example, this is probably confusing
2023-05-11 18:49:29 +02:00
Valentin Gagarin 2bc7e57227
reword note on default.nix 2023-05-11 18:40:27 +02:00
Valentin Gagarin 964b3cf2e1
update Nix version in tutorial
this is the one currently in nixpkgs-unstable
2023-05-11 18:39:50 +02:00
Zach Mitchell 4ed3b9ceb8 Remove nesting, add tutorial series description 2023-05-09 22:36:30 -06:00
Zach Mitchell b573def109 Set the structure of the tutorials section 2023-05-07 09:08:04 -06:00
Zach Mitchell 8313ca8824 Fix link to renamed anchor 2023-05-06 12:39:39 -06:00
LX fc1cad935a
add details about import (#506)
Add information about the behaviour of `import` if the given path is a directory.

Co-authored-by: Silvan Mosberger <github@infinisil.com>
2023-04-06 23:44:42 +02:00
Zach Mitchell, PhD 00e8606dd7
Fix typos in ad-hoc-developer-environments.md 2023-04-05 22:08:09 -04:00
Valentin Gagarin 89d5f8aa37
Merge pull request #491 from Hamled/patch-1
NIX_PATH includes nixpkgs in cross-compilation.md
2023-04-05 01:26:26 +02:00
Niklas Mohrin ac72c7256b
Add missing trailing newline in multi-line string example 2023-03-30 22:35:40 +02:00
Yuki Langley 25247077f4
Merge branch 'master' into information-overload 2023-03-29 14:20:53 +07:00
Charles Ellis 2067612bb3
NIX_PATH includes nixpkgs in cross-compilation.md 2023-03-23 17:47:45 -07:00
wzy 2da2d37082
Add information about installing nix by pacman (#399)
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-03-21 11:24:30 +01:00
Valentin Gagarin 77b5531a9a
rework nix-shell tutorial (#447)
this addresses multiple issues observed in user studies, in order to
make the first steps as smooth as possible.
2023-03-20 21:01:08 +01:00
Valentin Gagarin 076328e189
reword introduction to shebangs
a shebang is not the line, just the character sequence.
also it doesn't matter that much, so we may as well be brief.
2023-03-17 01:14:03 +01:00
Valentin Gagarin 2db9980664
fix heading level 2023-03-17 01:09:44 +01:00
olaf 442577eb25
tutorial: nixos configurations on vm (#334)
* tutorial: nixos configurations on vm


Co-authored-by: Benoit de Chezelles <bew@users.noreply.github.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Henrik <i97henka@gmail.com>
2023-03-16 18:37:04 +01:00
Valentin Gagarin 18bae0f41c
Merge pull request #446 from fricklerhandwerk/interpreted-scripts-next-steps
add additional links and next steps
2023-03-13 09:57:55 +01:00
Valentin Gagarin a9f1378349
use OpenGroup's spec for env 2023-03-08 22:19:46 +01:00
Panashe Fundira f16fd5854c
Quote URLs in nix language tutorial
Called out as an anti-pattern https://nix.dev/anti-patterns/language#unquoted-urls

This change is to make the docs more self-consistent, and promote good habits in the reader.
2023-03-05 08:51:35 -05:00
Valentin Gagarin 35833bd9fe limit depth of tutorials TOC 2023-03-05 02:53:27 +01:00
Domen Kožar 36d3bf7bd7
bump actions to fix a critical bug 2023-03-01 06:03:02 +00:00
Pol Dellaiera 2de1f5bd12
Update nix-language.md (#453) 2023-02-25 00:49:34 +01:00
Henrik fda85e22d0
working on #PR 325 - nix shell and shellbang (#427)
* changing to non-mobile wiki link

* adding link to nix-shell pure option.

* mentioning shebang just under the heading.

* adding bash in the listed included packages.

* corrected link snippet

* address review comments

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-02-16 19:23:23 +01:00
Valentin Gagarin 710a10af81
fixups to the Nix language manual (#448) 2023-02-16 15:48:22 +01:00
Valentin Gagarin a6efa591dc add additional links and next steps 2023-02-16 02:36:45 +01:00
Solène Rapenne 91eda534ef
add tutorial for nix-shell in shebang (#325)
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-02-14 18:24:11 +01:00
Maksim Horbul 0db5c1e909 fix: type in the code example 2023-02-12 09:50:47 +01:00
Valentin Gagarin 9241b4f1d6 do not duplicate information on references 2023-02-09 19:47:25 +01:00
Valentin Gagarin afe81027aa refine wording around string interpolation 2023-02-09 19:47:25 +01:00
Gabriella Gonzalez 51d2fa4e9c
Add credit for integration test example (#434) 2023-02-08 01:22:50 +01:00
Valentin Gagarin c22b9e139f remove notes and links to verifying Nix installation
Nix releases aren not signed any more:
https://github.com/NixOS/nix/pull/7411

nixos.org does not have the referenced section any more:
https://github.com/NixOS/nixos-homepage/pull/975
2023-02-06 10:30:48 +01:00
Felix Uhl e57b033647 Rename antiquotation to string interpolation
This is in accordance with the official naming, which was
[changed in Release 2.13](https://nixos.org/manual/nix/stable/release-notes/rl-2.13.html).
2023-01-30 15:27:17 +01:00
Domen Kožar ea42f78c36
Merge pull request #422 from doubledup/patch-1
Make install command in documentation compatible with fish shell
2023-01-24 16:40:41 +00:00
Ottmar Deinhart d8b911d12f
show how to exit nix repl (#433) 2023-01-20 22:21:53 +01:00
luukasahola 5a0d95fcd2 Fixed a minor function spelling error (Definitely didn't fix this to claim to be a NixOS contributor) 2023-01-10 12:25:19 +02:00
Luc Perkins af9c9eb3c1
Merge pull request #405 from yukiisbored/styling
Improve readibility via styling improvements
2023-01-05 16:43:55 +00:00
David Dunn be05bdef94
Use a pipe for all install commands 2022-12-28 09:36:27 +04:00
Valentin Gagarin ee2b3d63a0
Merge pull request #420 from gkelly/update-nixpkgs
Update example pinned nixpkgs to a recent one
2022-12-23 10:46:49 +01:00
Yuki Langley d8ee8efca0 install-nix: Use tabs to choose OS 2022-12-18 21:58:05 +01:00
Yuki Langley 5d1fa6c217 Use grid instead of table 2022-12-18 21:58:01 +01:00
Yuki Langley 505a96774c Use dropdown instead of details 2022-12-18 21:53:52 +01:00
Yuki Langley 79ca846ada Use Value instead of Result
Nix language tutorial asserts that it is called *Nix value* not *Nix
result*.
2022-12-18 21:18:28 +01:00
Yuki Langley 742f525741 Distinguish visually between expression and result
Related to https://github.com/NixOS/nix.dev/pull/395
2022-12-18 21:18:28 +01:00
David Dunn 4965408021
Add fish shell syntax for process substitution 2022-12-17 13:11:48 +02:00
Hans Christian v. Stockhausen e583297654
Fix minor error with import-builtin example (#421) 2022-12-16 18:45:35 +01:00
Garret Kelly 3264e91e74 Update example pinned nixpkgs to a recent one
The pinned nixpkgs in these examples does not work with more recent
versions of nix.

Fixes #419
2022-12-14 11:27:22 -05:00
Valentin Gagarin aeaf6a3cd9
Merge pull request #415 from mmolhoek/fix/document-pi-4-display-problem
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-12-13 12:24:30 +01:00
Mischa Molhoek 8290fb7c8f Comment about display problems and fix with older kernel
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-12-13 12:23:21 +01:00
Mischa Molhoek 26a7673f73
You have to run nixos-rebuild switch as well (#416) 2022-12-10 19:15:55 +01:00
Yuki Langley 3f95a892ff
Rewrite "Set up development environment" (#376)
* Rewrite "Set up development environment"

The previous version is specific to Python as it uses
`buildPythonApplication` instead of `mkShell`.

This one is more general but maintains the same Python Flask web
application example.

* Update pinning-nixpkgs to use 22.11

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-12-10 04:33:06 +01:00
Yuki Langley 6df9bfc5e0
Update source/tutorials/index.md
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-12-09 14:46:01 +01:00
Yuki Langley d58f1503da Remove information overload from toctrees 2022-12-08 20:45:53 +01:00
Yuki Langley 428416093c
Mention WSL 2 systemd support (#406) 2022-12-04 09:16:32 +01:00
Henrik fa6aebeea6
Correction in calling functions section (#402)
* correction in calling functions section

List elements separated by white space
examples were not generating correctly.
2022-11-26 01:24:13 +01:00
Jörg Thalheim 858bf0eae3
nix-language: attempt to simplify concept overview (#397)
In the current text its not even for me clear what it is referring to. This rewrite tries to give more examples for each concept of the language.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-11-24 10:05:32 +01:00
Valentin Gagarin 6ae488e715
Merge pull request #388 from fricklerhandwerk/nix-language-introduction
rework parentheses example
2022-11-18 17:16:39 +01:00
Valentin Gagarin ec14804aee
Merge pull request #387 from fricklerhandwerk/nix-language-examples
refine worked examples
2022-11-18 17:15:50 +01:00
Valentin Gagarin dd8e3f6aa3
Merge pull request #386 from fricklerhandwerk/nix-language-tutorial
Nix language tutorial: add explanation on how `pkgs.lib` is obtained
2022-11-18 17:15:15 +01:00
Valentin Gagarin 8efe974f67
Merge pull request #392 from fricklerhandwerk/nix-language-derivation 2022-11-12 12:09:49 +01:00
Valentin Gagarin a2f10f337f fix wording on derivations
most importantly, derivations are not a special data type, but only
a certain kind of attribute set with two magic attributes.

we don't go into the details of the magic here, because it's really hard
to explain concisely. it would only distract from the surface feature
we care about here: composition through store paths.
2022-11-11 10:40:33 +01:00
Valentin Gagarin ad19f50231 fix typos, grammar, indentation 2022-11-09 11:14:04 +01:00
Valentin Gagarin ecf756298f
Update source/tutorials/nix-language.md 2022-11-08 20:40:39 +01:00
Yuki Langley ac06c07360 Make code blocks consistent
Illustration of shell sessions or terminals should use shell-session.

Entire expressions should be encapsulated in code blocks, not inline code.
2022-11-08 17:37:41 +01:00
Valentin Gagarin ade558c532 rework parentheses example
it was reported that the list example was confusing and lacked
explanation.

moved the example to function application, and reduced the syntax notes
to "notes on whitespace". moved the emphasis on the goals of this
tutorial to its proper place in the introduction.

it's good to leave the whitespace notes in the introductory part,
because they are unspecific and clearly belong to the "don't worry, it
may look weird, but that doesn't matter" part.
2022-11-08 14:28:01 +01:00
Valentin Gagarin 9b63c68d5c refine worked examples
it was reported that the NixOS configuration is confusing, because
information is lacking to understand what it does.

added another note reminding of this tutorial's objective.

added section headings to give hints where to look next.
2022-11-08 13:35:51 +01:00
Valentin Gagarin 3b775207a5 clarify how library functions are implemented 2022-11-08 13:16:53 +01:00
Valentin Gagarin 4a18a5ffdc add explanation on how pkgs.lib is obtained 2022-11-08 12:38:20 +01:00
Yuki Langley a4a6ce812b Rewrite GitHub anchor links to user-content-
Due to an Sphinx issue[1], linkcheck fails on GitHub anchors for
GitHub rendered documents.

This change rewrites the anchors to the ones that can be verified by
linkcheck.

[1]: https://github.com/sphinx-doc/sphinx/issues/9016
2022-11-03 17:36:40 +01:00
Valentin Gagarin 6b6dac8a6b
Merge pull request #343 from jherland/nix-language-readthrough
Nix language tutorial: fix typos, add notes
2022-10-27 10:06:15 +02:00
Niklas Hambüchen 5d4cadace9
integration testing: Fix attribute name for interactive testing
According to

70ec3b9f54/nixos/doc/manual/development/running-nixos-tests-interactively.section.md (running-tests-interactively-sec-running-nixos-tests-interactively)

`driverInteractive` is needed, and just `driver` indeed just runs through
without giving me an interactive shell.
2022-10-25 13:54:53 +02:00
Nejc Zupan 5ab8d5a77f Fix leftovers from .rst -> .md migration
Sphinx doesn't care about filetype suffixes so we didn't see any errors.

But it's still nice to do this bit of gardening, I suppose?
2022-10-22 17:21:04 +02:00
Yuki Langley 4f33a6d07c Move contributing from tutorials to top-level 2022-10-22 15:13:27 +02:00
Johan Herland 7017fdbb00 Warn about combining paths and antiquotation too early in the tutorial
This is the point in the tutorial where I started playing around with
paths and antiquotation in a `nix repl` session and got seriously
confused for a few minutes...

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-10-19 12:01:09 +02:00
Johan Herland 17b1bd8c2e Add a sentence on what happens to antiquoted dirs (vs. files) 2022-10-19 12:00:42 +02:00
Johan Herland eb0615c397 Clarify explanation under the NixOS config example
Split one long point into two to make things clearer.

Also explain what happens to the `./hardware-configuration.nix` when evaluated.
2022-10-19 12:00:42 +02:00
Johan Herland 07098339b2 Minor clarifying reword
Without this, it almost sounds like you can bind a function to any other value.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-10-19 12:00:42 +02:00
Johan Herland 4b9563eb5d Fix typo 2022-10-17 13:33:14 +02:00
Domen Kožar e269b465e7
github actions: bump versions 2022-10-12 14:23:52 +01:00
Yann Hamdaoui 7bd6c145bc
Fix typo in Nix language tutorial
Fix the evaluation result of an example which missed enclosing brackets.
2022-10-04 17:04:51 +02:00
Valentin Gagarin a68cf03133 rework section on purity, move antiquotation up 2022-10-04 08:34:34 +02:00
Valentin Gagarin 0bfd4b1bb2 add introductory notes on syntax 2022-10-04 08:34:34 +02:00
Valentin Gagarin abb1808c31 guide -> tutorial 2022-10-04 08:34:34 +02:00
Valentin Gagarin df7024c253 a Linux distribution 2022-10-04 08:34:34 +02:00
Valentin Gagarin 39cfb88480 show inherit inside let 2022-10-04 08:34:34 +02:00
Valentin Gagarin e711230b39 attribute sets are actually ordered 2022-10-04 08:34:34 +02:00
Valentin Gagarin b8e80af94a a derivation 2022-10-04 08:34:33 +02:00
Valentin Gagarin 014e0e507b remove too detailed details 2022-10-04 08:34:33 +02:00
Valentin Gagarin a2fe15959e rework import and side effects
based on detailed review by @infinisil
2022-10-04 08:34:33 +02:00
Valentin Gagarin cf9c8c1919 improve wording on attribute set arguments 2022-10-04 08:34:33 +02:00
Valentin Gagarin 46f1c25277 more clarifications on curried functions 2022-10-04 08:34:33 +02:00
Valentin Gagarin 961bb2766a be more precise what we cover here
most importantly, the "elements of programming" approach is understood
in a broader sence. we don't really deal with operators and just subsume
them under functions.
2022-10-04 08:34:33 +02:00
Valentin Gagarin e64b2059e0 flarify role of NixOS 2022-10-04 08:34:33 +02:00
Valentin Gagarin 23c8c80481 note the overview is an overview 2022-10-04 08:34:33 +02:00
Valentin Gagarin e5b77c58fc make Derivations a topic on its own
this pays tribute to its central role in Nix and elegantly removes it
from the part on side effects, whicht it doesn't belong to.
2022-10-04 08:34:33 +02:00
Valentin Gagarin b3407ec6b6 move indented strings to the end
they are the least significant combination of frequency of occurrence
and peculiarity, even if they're really handy.

but remember, the goal is to help people *understand* Nix language code,
not write it effectively.
2022-10-04 08:34:33 +02:00
Valentin Gagarin 90cbe92389 clarify purpose of inherit 2022-10-04 08:34:33 +02:00
Valentin Gagarin 8047c8f16e restructure functions section 2022-10-04 08:34:33 +02:00
Valentin Gagarin 3e89ed3038 search paths are not reproducible at all 2022-10-04 08:34:33 +02:00
Valentin Gagarin f478379550 add missing semicolons 2022-10-04 08:34:33 +02:00
Valentin Gagarin 1d86654878 elaborate on current directory 2022-10-04 08:34:33 +02:00
Valentin Gagarin 69b0858367 add emphasis 2022-10-04 08:34:33 +02:00
Valentin Gagarin 1dd5699888 less strict wording 2022-10-04 08:34:33 +02:00
Valentin Gagarin d2cad3d48e clarify nested functions with parentheses 2022-10-04 08:34:33 +02:00
Valentin Gagarin de6128a8f8 chaining arguments -> multiple arguments
"chaining arguments" is not well-defined, as [noted] by @matta

[notes]: https://github.com/NixOS/nix.dev/pull/267/files#r968597277
2022-10-04 08:34:33 +02:00
Valentin Gagarin f66543da01 Nix language -> the Nix language
as [pointed out] by @matta

[pointed out]: https://github.com/NixOS/nix.dev/pull/267/files#r968574463
2022-10-04 08:34:33 +02:00
Valentin Gagarin ff2c457f32 reword; there are also invalid expressions 2022-10-04 08:34:33 +02:00
Valentin Gagarin e9af30a6ff shorten time estimate
move the section further up, as recommended by @infinisil
2022-10-04 08:34:33 +02:00
Valentin Gagarin d910383580 capitalize list items
according to English style guides such as [1]

[1]: https://www.instructionalsolutions.com/blog/bulleted-list-punctuation
2022-10-04 08:34:33 +02:00
Valentin Gagarin 93706c411e add notes on strict evaluation 2022-10-04 08:34:33 +02:00
Valentin Gagarin 109ae74e94 Update source/tutorials/nix-language.md
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin aaea5b42c0 Update source/tutorials/nix-language.md
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin 1fcaaea3b0 Update source/tutorials/nix-language.md
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin 68c33e7ed1 Update source/tutorials/nix-language.md
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin 7474d830a1 Update source/tutorials/nix-language.md
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin 90522e865f expressions are transformed, not simplified
@infinisil: This is a bit misleading, the model isn't that expressions get simplified. Instead it's that each expression type has semantics for how it should be turned into a Nix value.

Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin 14455c1d86 evaluate to Nix value, not just value
@infinisil: Introducing the concept of a Nix value fits very well here

Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin e5260f3d6d libraries are not just functions
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin 55eb91bd9e stdenv -> stdenv.mkDerivation
@infinisil: `stdenv` itself is not a builder

Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin 5938ad044b remove "and" from example list
@infinisil: The "and" would indicate the end of the list

Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin 506b35311e libraries have more things than functions
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin 30d76c858b use less ambiguous grammar for what NixOS is
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin abf0f5e6d3 use consistent grammatical structure in requirements
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin 95ce02b793 update Nix manual URLs 2022-10-04 08:34:33 +02:00
Valentin Gagarin 8ac15f8a08 Update source/tutorials/nix-language.md
Co-authored-by: Dan Baker <daniel.n.baker@gmail.com>
2022-10-04 08:34:33 +02:00
Valentin Gagarin 78a43fb28f use consistent terminology
sort out derivation, Derivation, `derivation` and store derivation
2022-10-04 08:34:33 +02:00
Valentin Gagarin adaba6637e fix wording 2022-10-04 08:34:33 +02:00
Valentin Gagarin e0ee7d5597 link to installation instructions 2022-10-04 08:34:33 +02:00
Valentin Gagarin 17bf23546a rework section on side effects 2022-10-04 08:34:33 +02:00
Valentin Gagarin 397a39f9de mention operators
at some point we have to introduce them, even if they are not really
important here.
2022-10-04 08:34:33 +02:00
Valentin Gagarin 8f1dd17106 add proper examples to file system paths 2022-10-04 08:34:33 +02:00
Valentin Gagarin c36c6ed732 rewordings and links 2022-10-04 08:34:33 +02:00
Valentin Gagarin 8a4d87474b add detailed explanations to some examples 2022-10-04 08:34:33 +02:00
Valentin Gagarin cd7e00ba8d reword time estimate 2022-10-04 08:34:33 +02:00
Valentin Gagarin bb9e7d7ab3 Nix package manager -> Nix
based on https://github.com/NixOS/nix.dev/issues/275#issuecomment-1227572104
2022-10-04 08:34:33 +02:00
Valentin Gagarin 7e18f44302 add introduction and cross-linking
this should both help with initial overview and navigation
2022-10-04 08:34:33 +02:00
Valentin Gagarin 5851659340 add detailed explanation to let expression 2022-10-04 08:34:33 +02:00
Valentin Gagarin 4253a0bc7a nixpkgs/lib -> pkgs.lib
this is probably how most people would encounter it, but since there are
so many equivalent representations, maybe it does not matter outside
a dedicated guide to Nixpkgs
2022-10-04 08:34:33 +02:00
Valentin Gagarin 922e018fd6 nixpkgs -> Nixpkgs
based on https://github.com/NixOS/nix.dev/issues/275#issuecomment-1227572104
2022-10-04 08:34:33 +02:00
Valentin Gagarin b084005748 fix copypaste error 2022-10-04 08:34:33 +02:00
Valentin Gagarin aa0bf42491 fix typo in link 2022-10-04 08:34:33 +02:00
Valentin Gagarin 55c4d4feca attempt at detailed explanation 2022-10-04 08:34:33 +02:00
Valentin Gagarin dfc6d1c31f standard -> function 2022-10-04 08:34:33 +02:00
Valentin Gagarin ab8784c2ad add links to next steps 2022-10-04 08:34:33 +02:00
Valentin Gagarin aebc9e91b1 clarifications 2022-10-04 08:34:33 +02:00
Valentin Gagarin d770b13aef add links, fixups 2022-10-04 08:34:33 +02:00
Valentin Gagarin 8ee55cbac1 expand on side effects, add next steps 2022-10-04 08:34:33 +02:00
Valentin Gagarin c9f5ac3f1f show store paths and fetchers 2022-10-04 08:34:33 +02:00
Valentin Gagarin 3a86358dbf add TODO for operators 2022-10-04 08:34:33 +02:00
Valentin Gagarin 92f96cab30 more explicit explanation of partial evaluation 2022-10-04 08:34:33 +02:00
Valentin Gagarin 95f98f6a60 more explicit syntax notes 2022-10-04 08:34:33 +02:00
Valentin Gagarin f791bd4875 nixpkgs is a token 2022-10-04 08:34:33 +02:00
Valentin Gagarin cf0292e470 restructure introduction, show elements of programming
this does not take away information, but presents it in a different
order. put emphasis on that the language does not do all that many
things.
2022-10-04 08:34:33 +02:00