Generate flake.nix from module options. Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/ dendrix.oeiuwq.com/Dendritic.html
dendritic nix inputs
Nix 52.9%
MDX 30.6%
Astro 11.4%
Shell 3.1%
JavaScript 1.9%
TypeScript 0.2%
CSS 0.1%
136 1 3

Clone this repository

https://tangled.org/oeiuwq.com/flake-file https://tangled.org/did:plc:hwcqoy35x55nzde2sm6dbvq7/flake-file
git@tangled.org:oeiuwq.com/flake-file git@tangled.org:did:plc:hwcqoy35x55nzde2sm6dbvq7/flake-file

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

Sponsor Vic Dendritic Nix CI Status License

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

flake-file and vic's dendritic libs made for you with Love++ and AI--. If you like my work, consider sponsoring

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, nixlock

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.
  • 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, nixlock 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/vic/flake-file/archive/main.zip -A flake-file.sh --run bootstrap