1
0
Fork
You've already forked nixlings
0
forked from kookie/nixlings
❄️ Small exercises to get you used to reading and writing Nix code!
  • Nix 100%
Katharina Fey f6e2fbe8b3 Update README
Add a disclaimer about the project state
2022年11月28日 14:56:33 +00:00
attrsets attrsets: fix excercise 4 2022年11月28日 11:47:04 +02:00
functions Fix minor issues 2022年11月28日 12:31:36 +02:00
map Add additional attrset nixling puzzle 2022年11月27日 13:59:05 +02:00
LICENSE Initial commit 2022年11月25日 01:02:42 +01:00
logo.png Update excercises and README 2022年11月26日 17:17:39 +02:00
README.md Update README 2022年11月28日 14:56:33 +00:00

❄️💙 Greetings and welcome to nixlings.

This project contains small exercises to get you used to reading and writing Nix code. This includes reading and responding to error messages from the Nix daemon.

This project is very work in progress. Some of the excercises are much harder than others. If you find any inconsistencies or problems, please open an issue so I can fix it! Thank you.

Exercise structure

Each category has a set of files which should be solved in order of their file-names (0_basic, 1_foo, 2_bar, ...). Some of the more complicated excercises contain the solution towards the end of the file.

To run an excercise you should use the nix eval command, as follows:

$ nix eval -f <file> output

This command evaluates the given file after -f and then attempts to evaluate output for the given file. What that means is that only the output part of each of the excercise attribute sets is displayed in your terminal.

(You will need to have enabled extra-experimental-features nix-command for this to work. You can either provide this to the CLI via --extra-experimental-features nix-command or create a configuration file at ~/.config/nix/nix.conf)

extra-experimentla-features = nix-command

If you get stuck you can scroll down to the bottom of the file (past line 80) to see the solution to the puzzle.

If you have any questions, feel free to open an issue :)

Excercise order

Some of the excercises are harder than others. Generally excercises can be done in any order, but if you're new, the following order is recommended:

  1. attrsets
  2. functions
  3. map