13

GitHub - divnix/std: The Nix Flakes framework for perfectionists with deadlines...

 2 years ago
source link: https://github.com/divnix/std
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
logo.png

Standard

Ship today.

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.

Once your nix code has evolved into a giant ball of spaghetti and nobody else except a few select members of your tribe can still read it with ease; and once to the rest of your colleagues it has grown into an impertinence, then std brings the overdue order to your piece of art through a well-defined folder structure and disciplining generic interfaces.

With std, you'll learn how to organize your nix flake outputs ('Targets') into Cells and Cell Blocks — folded into a useful CLI & TUI to also make the lives of your colleagues easier.

Through more intuition and less documentation, your team and community will finally find a canonical answer to the everlasting question: What can I do with this repository?


The std repository itself

In this repository, you'll find, both, the implementation and an application of Standard.

Implementation

What is std? — The well-commented nix code → ./src.

That folder implements:

  • std.grow: the "smart" importer
  • std.growOn: std.grow-variant that recursively merges all additional variadic arguments
  • std.harvest: harvest your Targets into a different shape for compatibility
  • std.winnow: when more advanced harvesting is required, use this to harvest and filter the output
  • std.incl: a straight-forward source filter with additive semantics
  • std.deSystemize: a helper to hide system from plain sight
  • std.<blockType>: builtin (Cell) Block Types that implement (Cell Block Type) Actions

Application

Dog-fooding? → ./cells.

  • Cells: ./cells mainly implements std.
  • Cell Blocks: std implements:

  • Targets: each Cell Block implements one or various targets.
  • Block Type Actions: some Targets expose Actions inferred from the Block Type.
{{#include ../dogfood.nix}}

That's it. std.grow is a "smart" importer of your nix code and is designed to keep boilerplate at bay.

TIP: Now, enter the devshell (direnv allow) and play with the std CLI/TUI companion. It answers one critical question to newcomers and veterans alike:

What can I do with this repository?

Documentation

Where can I find the documentation? → ./docs.

No, I mean rendered? → The Standard Book.

The documentation is structured around these axes:

For Study For Work
The Practice Tutorials How-To Guides
The Theory Explanation Reference

Licenses

What licenses are used? → ./.reuse/dep5.

And the usual copies? → ./LICENSES.

Releases

You may find releases on the GitHub Release Page of this repository.

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:

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

Contributions

Please enter the development environment:

direnv allow

</article


Recommend

  • 168

    Django Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Thanks for checking it out. All documentation is in the "docs" directory and online at

  • 32
    • www.tuicool.com 6 years ago
    • Cache

    NixOS [RFC 0049] Flakes

    feature start-date author co-authors shepherd-team shepherd-leader related-issues flakes 2019-07-09 Eelco Dolstra TBD...

  • 13

    pytest的插件介绍:pytest-cov、pytest-pep8与pytest-flakes 2018-04-23 20:54:15 +08  字数:1541  标签: Python

  • 60

    Nix Flakes are the long awaited addition coming with the next major release of Nix. What are Flakes, what do they offer, how can you use them now and should you consider migrating? Walking through Snow, eh Nix Flakes for OS...

  • 10

    What? If you're reading DEV, your computer is probably your primary productivity tool. Whether it's a job, a hobby, or just a point of interest, your ability to install and use different types of software with ease is integr...

  • 17
    • christine.website 3 years ago
    • Cache

    Nix Flakes: Exposing and using NixOS Modules

    Nix Flakes: Exposing and using NixOS Modules A 17 minute read. Nix flakes allow you to expose NixOS modules. NixOS modules are templates for system configuration and they are the basis of how you configure NixOS. Today we're going to...

  • 41

    homeblogdocsNix flakes, and how to convert to them Nix's (relatively) new "flakes" feature ha...

  • 8
    • ilanjoselevich.com 3 years ago
    • Cache

    Building websites using Nix Flakes and Zola

    Ilan Joselevich published on November 19, 2021 7 min, 1383 words A quick first blog post introductionWelcome! This is my new and only we...

  • 27
    • thiscute.world 2 years ago
    • Cache

    NixOS 与 Nix Flakes 新手入门

    到 2023/05/05 为止,我的 NixOS 练习时长仅半个月,因此本文作为一篇新手学习笔记,难免会有些错漏,请谨慎阅读,当然我也会在后续尽力修补与完善内容。本文的目标 NixOS 版本为 22.11,Nix 版本为 2.15.0,在此环境下...

  • 8
    • jvns.ca 1 year ago
    • Cache

    Some notes on nix flakes

    Some notes on nix flakes • nix • I’ve been using nix for about

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK