GitXplorerGitXplorer
s

nixlings

public
28 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
477ab4838bd8565ef20374beca9451c6088d2a56

Swap order

sspacekookie committed 2 years ago
Verified
f6a350a6bd00da2ada82a7310acb5a13b5586bba

Fix typo

sspacekookie committed 2 years ago
Unverified
14afe4f76aecd90c33208409b5cc8b1b46a11b4a

Fix minor issues

sspacekookie committed 2 years ago
Unverified
367667025ab56e9287291bc2d381f160416ccdb0

attrsets: fix excercise 4

sspacekookie committed 2 years ago
Unverified
457d67be3463c294c26042b999e7e8d4d91b1a30

Change README formatting

sspacekookie committed 2 years ago
Unverified
dbe4fb137ab6501b3d4f6f59d5a0ab10d90a8d0d

Add explanation about experimental cli usage

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