Skip to content

Latest commit

 

History

153 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sponsor Vic Dendritic Nix CI Status License

Non-static Nix on your flake inputs! Define custom output schemas.

If Flake-File or other denful libs have been of use to you, consider sponsoring.

NOTE: Den no longer relates to the "Dendritic" name, Den was born to explore the limits of that pattern and has evolved to something much more advanced and flexible, the official dendritic repo no longer considers this Dendritic.

flake-file lets you generate a clean, maintainable flake.nix from Nix module options. Use the real Nix language to define your inputs.

It makes your flake definition base on the Nix module system.

This means

  • You can use lib.mkDefault or anything you normally do with the Nix language, and have them reflected in flake.nix.
  • Your inputs follow a typed Input Schema.
  • Your outputs can be defined on a typed Output Schema example.

Despite the original flake-oriented name, it NOW also works on stable Nix, non-flakes environments via npins, unflake

Features

  • Flake definition aggregated from Nix modules.
  • Input and Output schemas based on Nix types.
  • Syntax for nixConfig and follows is the same as in flakes.
  • flake check ensures files are up to date.
  • App for flake.nix generator: nix run .#write-flake
  • Custom do-not-edit header.
  • Reduce duplicate inputs using automatic follows powered by flake-edit, or via automatic flake.lock flattening.
  • Incrementally add flake-parts-builder templates.
  • Pick flakeModules for different feature sets.
  • Dendritic flake template.
  • Works on stable Nix, npins, unflake environments.
image

this cute ouroboros is puking itself out.

Learn more: Documentation

Try it Now!

mv flake.nix flake-file.nix
nix-shell https://github.com/denful/flake-file/archive/main.zip -A flake-file.sh --run bootstrap

About

Generate flake.nix from module options. Input and Output schemas. Works with flakes, unflake, npins or tack

Topics

Resources

Stars

155 stars

Watchers

4 watching

Forks

Releases

Sponsor this project

Contributors

Languages