Skip to main content

Project setup

Repository Structure

This is what our minimal project folder structure looks like:

├── flake.nix
├── models
│   ├── config.json
│   ├── ...
│   └── main.py

The Flake

Nix AI uses Flakes to define training. Read more about Nix Flakes.

The outline of a Nix AI flake.nix looks as follows:

# flake.nix
{
inputs = { nix-ai.url = "git+https://git.wavelens.io/public/nix-ai"; };
outputs = { nix-ai, ... }: nix-ai.lib.mkFlake {
# Later we will define how our training shall look like in here.
...
};
}

There is also a folder models in which the Python code for our model resides. We will explain the model and its training on the following pages.