GitXplorerGitXplorer
s

nixlings

public
28 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
e017eed947be5dc04d3943ae7f95db09b321d9a7

Add additional attrset nixling puzzle

sspacekookie committed 2 years ago
Unverified
ee85ffad8c3642adc0e4124ee2f7e64d476433a5

Small style fixes

sspacekookie committed 2 years ago
Unverified
786cc36e278a667bc33d5daef281d1b6c129b1ce

Add advanced mapping example

sspacekookie committed 2 years ago
Unverified
a774e16cca6ffd7a39277025af98d5dc1985f146

Update README

sspacekookie committed 2 years ago
Unverified
4eff8da45fafff6a00318784802f998459222c84

Some more advanced filter and map examples

sspacekookie committed 2 years ago
Unverified
0737855a7fe262893cad030fcd8c6660d283a9b6

Update function examples with solutions

sspacekookie committed 2 years ago

README

The README file for this repository.

❄️💙 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.

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-experimental-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