divnix / nix-book

The Nix Package Manager
https://book.divnix.com
Creative Commons Zero v1.0 Universal
70 stars 10 forks source link

Mention `foo.bar = ` syntax for attrsets #14

Closed tejing1 closed 2 years ago

tejing1 commented 2 years ago

https://book.divnix.com/ch05-01-language-basics.html#attribute-set-attr-set should probably mention that you can set keys in nested attrsets with foo.bar =, and that you can set multiple keys under the same top-level key with multiple lines, not necessarily grouped together:

{
  foo.bar = 1;
  quux = 2;
  foo.baz = 3;
}

The fact that this also works for lets... we can probably skip. :-P

jonringer commented 2 years ago

oh yea, how did I forget this... lol