Templates
flake-file ships several Nix flake templates. Initialise any of them with:
nix flake init -t github:vic/flake-file#<template>default
Section titled “default”A minimal, explicit setup without extra framework dependencies.
# flake-parts module — see templates/default{ inputs, ... }: { imports = [ inputs.flake-file.flakeModules.default ];
flake-file.inputs = { flake-file.url = "github:vic/flake-file"; flake-parts.url = "github:hercules-ci/flake-parts"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; };
systems = inputs.nixpkgs.lib.systems.flakeExposed;}Run
nix run .#write-flaketo generateflake.nix.
dendritic
Section titled “dendritic”Includes flakeModules.dendritic — the recommended starting point for new Dendritic projects. Comes with import-tree, flake-parts, and sensible defaults.
nix flake init -t github:vic/flake-file#dendriticnix run ".#write-flake"nix flake checkUses lib.flakeModules.flake-parts-builder for projects that manage their flake-parts modules with flake-parts-builder.
For non-flake (stable Nix) environments. Uses npins to pin inputs. Supports channels, GitHub, GitLab, tarballs, and git repos. Recommended for new non-flake projects.
nix flake init -t github:vic/flake-file#npinsunflake
Section titled “unflake”For non-flake (stable Nix) environments. Uses goldstein/unflake to pin inputs.
nix flake init -t github:vic/flake-file#unflakeTip: You can use the
write-flakeapp as part of a devshell command or a git pre-commit hook to keepflake.nixalways up to date.