Why Flakes? - Lessons from Building a Training Environment in a Students' Association

Flakes is an experimental but very popular feature in nix. However, many people interested in nix may not understand flakes' value.

On the other hand, the Educational scenes have some pain points. For example, Low Reproducibility (will cause "It doesn't work for me"), Difficulty of Building Environment (will spend a lot of time for building environment), and more.

This workshop aims to understand 3 benefits by using Flakes/nix, and how to use Nix or Flakes more efficiently in Development and Education scene.

  1. High Reproducibility
  2. Easy to Setting up and Distributing Environment(s)
  3. Run in the Local Machine (Not in the VM, Container or Cloud)
    Especially benefit #3 is very important benefit in the Education because students' computer may not have sufficient specs to run container(s), or stable internet access to use cloud environment.

In our Students' Association, we use Flakes for our training system. Our training system provides configured Emacs and language-specified development environment via Flakes. Thanks for Flakes, the participant not have to clone system's repository, they have to run single command to enter the environment, nix develop github:org/repo.

We also use Org-mode and its files as learning contents, because it provides a Literate Programming environment. Literate Programming allows participants to document not only the code they write, but also their thought process — making it ideal for educational settings.
Also, the textbooks written by Org-mode is "Executable". Participants not need copy&paste example code, they need C-c C-c to execute example code.

Workshop Contents:

  • Introduction (5m)
  • About Flakes (5m)
  • About Literate Programming (5m)
  • Hands-on 1: Run our Flake on your Machine Local (15m)
  • Hands-on 2: Literate Programming for Learning Contents (40m)
  • Why we Distribute Environment with Emacs Configuration (5m)
  • Hands-on 3: Create your Own Flakes with your Favorite Editor and its Configurations (40m)
  • Conclusion (5m)
    * Each hands-on includes troubleshooting time (5-10m)
Kleha

Kleha is Japanese Student Developer in Osaka Metropolitan University College of Technology (OMUCT), a 5-year Japanese technical college (KOSEN).
He worked for building reproducible solution (e.g. lecture text, stage bulletin system "Nex-Board") using nix in Students' Association.