blob: fca31a8212711e2654c26a0dcabd99227e590cf1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
`nix repl` to interactively evaluate Nix expressions. `:p` if output is not full.
`nix-instantiate --eval <file>.nix` to evaluate a Nix expression from a file. `--strict`.
Nix is like JSON, but with functions.
Recursive attribute sets can reference values declared earlier in the same set.
```nix
rec {
one = 1;
two = one + 1;
}
```
A `let` binding is used to assign names to values just as attribute sets, they can then be used in expressions. Let bindings have a local scope.
A `with` allows referencing attributes of attribute sets without referencing the set.
|