Valentin Gagarin
75eceb50cd
small wording improvements ( #877 )
2024-01-28 18:30:34 +00:00
Robert Hensing
9cc2ddd16a
Merge pull request #764 from fricklerhandwerk/add-manuals
...
host Nix reference manual on nix.dev
2023-12-04 17:10:45 +01:00
olaf
1a404f203e
vm improve reproducible command and 23.11 ( #807 )
...
* better reproducable command and 23.11
Co-authored-by: Henrik <i97henka@gmail.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-11-27 16:39:04 +01:00
fricklerhandwerk
c70711a9d5
update all links to the Nix manual
2023-11-27 07:30:36 +01:00
Lorenzo Manacorda
ca15343a1a
Fix spell checking errors
2023-11-13 13:46:03 +01:00
Valentin Gagarin
5aa0254754
search path -> lookup path ( #747 )
...
recent additions to the Nix manual clarify the distinction between
search path and lookup path, and also document the resolution algorithm.
lookup paths are now a distinct Nix language construct with its own
reference documentation.
2023-11-13 10:30:42 +01:00
fricklerhandwerk
2f09d22b8b
fix styling issues and links
2023-11-01 23:52:10 +01:00
fricklerhandwerk
869d6bd0b4
move Nix language tutorial to top level
...
this fits the global outline we developed, and also makes the tutorial
more immediately visible - working with the Nix language is a core skill
we want to teach after all
2023-10-09 17:26:06 +02:00
Zach Mitchell
b573def109
Set the structure of the tutorials section
2023-05-07 09:08:04 -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
Niklas Mohrin
ac72c7256b
Add missing trailing newline in multi-line string example
2023-03-30 22:35:40 +02: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
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
Pol Dellaiera
2de1f5bd12
Update nix-language.md ( #453 )
2023-02-25 00:49:34 +01:00
Valentin Gagarin
710a10af81
fixups to the Nix language manual ( #448 )
2023-02-16 15:48:22 +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
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
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
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
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
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
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
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
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