/std

The Nix Flakes framework for perfectionists with deadlines [maintainer=@blaggacao]

Primary LanguageNix

Standard

Ship today with architecture for tomorrow

Standard is THE opinionated, generic, Nix Flakes framework that will allow you to grow and cultivate Nix Cells with ease.

Nix Cells are the fine art of code organization using flakes.

As a Nix Cell Cultivator, you can focus on building for your use cases and ride on the marvels of nix flakes while wasting virtually no thoughts on boilerplate code organization.

Because Standard is a proper framework, you benefit from continued performance and feature upgrades over time with minimum effort. ✨

Code Organization

Standard has a pre-defined place for all your code. Packages, applications, functions, libraries, modules, profiles: they all have a home.

Developer Experience

Standard projects are as declarative as possible; we eliminate most boilerplate; zero-config workflows... everything Just Works™.

DevOps Professionals

Standard doesn't just throw more options at you. It gives you and your team something much more valuable: guidance.

Discoverability & Gamification

Standard's companion TUI/CLI std focuses on polyglot discoverability of your repository's targets & actions. Build a package, run a test, publish an artifact... Explore what's available with style! 😎

How it's organized

Standard places all the code in a directory of your choice.

Then, with just very few hints, Standard undestands your codebase and let you and others easily discover what your code base has to offer. Almost like gitops-gamification.

Related code is grouped into Cells that can be composed together to form any functionality you can imagine.

A Cell provides functionality through Organelles of Clade:

  • Runnables
  • Installables
  • Functions
  • Data

You can even define your own clades. The standard clades already define a set of actions that can be run on such clades. Check them out in ./src/clades.nix

The built-in default Organelles are:

  • Applications (Runnables)

    Instructions that can be run. For example: cd, ls, and cat are applications.

  • Packages (Installables)

    Contents (files and/or directories) generated in a pure and reproducible way, also known as derivations.

  • Libraries (Functions)

    Instructions on how to turn the given inputs into something else.

    They act like a library that you and others can use in order to abstract, share and re-use code.

A potential alternative to the default Organelle types could be:

  • NixOS Modules (Functions)
  • NixOS Profiles (Functions)
  • DevShell Profiles (Functions)
  • Just Tasks (Runnables)
  • Entrypoints (Runnables)

Documentation

Please go through the annotated source code:

Then, this repo also is Standardized and you can explore it functionality, including documentation by entering the Devshell and just type std.

Or consume the doc page under: https://divnix.github.io/std

Examples in the Wild

If you'd like to see some examples of what a Standard project looks like, take a look at the following:

🚧 Work in progress, would like to help us extend this section?

Contributions

Please get ourself the appropriate environment:

With direnv

direnv allow

Without direnv

nix develop ./devshell -c $SHELL
menu