Quick Start
Prerequisites
Section titled “Prerequisites”- Nix with flakes enabled.
- An internet connection to fetch the template.
Create a new project
Section titled “Create a new project”Use the dendritic template — it sets up a full flake-parts + import-tree environment with flake-file already wired in.
nix flake init -t github:vic/flake-file#dendriticGenerate flake.nix
Section titled “Generate flake.nix”nix run ".#write-flake"This evaluates your modules, merges all flake-file.* options, and writes flake.nix.
cat flake.nix # inspect the generated fileVerify
Section titled “Verify”nix flake checkThis confirms that flake.nix is up to date with the current module state. Run this in CI.
Add your first input
Section titled “Add your first input”Open (or create) a module under ./modules/. Declare any dependency close to where it is used:
{ inputs, lib, ... }: { flake-file.inputs.my-tool.url = lib.mkDefault "github:owner/my-tool";
# Use the input once it's in flake.nix imports = lib.optionals (inputs ? my-tool) [ inputs.my-tool.flakeModule ];}Then regenerate:
nix run ".#write-flake"Next Steps
Section titled “Next Steps”- Migration Guide — adopt flake-file in an existing project.
- flakeModules — explore all built-in modules.
- Options Reference — every
flake-file.*option explained.