Warning: This program is experimental and its interface is subject to change.
Name
nix flake new - create a flake in the specified directory from a template
Synopsis
nix flake new [option...] dest-dir
Examples
-
Create a flake using the default template in the directory
hello:# nix flake new hello -
List available templates:
# nix flake show templates -
Create a flake from a specific template in the directory
hello:# nix flake new hello -t templates#trivial
Description
This command creates a flake in the directory dest-dir, which must
not already exist. It's equivalent to:
# mkdir dest-dir
# cd dest-dir
# nix flake init
Options
--template/-ttemplate
The template to use.
Common evaluation options:
-
--argname expr
Pass the value expr as the argument name to Nix functions. -
--argstrname string
Pass the string string as the argument name to Nix functions. -
--eval-storestore-url
The Nix store to use for evaluations. -
--impure
Allow access to mutable paths and repositories. -
--include/-Ipath
Add path to the list of locations used to look up<...>file names. -
--override-flakeoriginal-ref resolved-ref
Override the flake registries, redirecting original-ref to resolved-ref.