HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

nix flake init — Create a flake in the current directory from a template. More information: <https://nix.dev/manual/n

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thecurrentcreatedirectorycommandnix flake initcliflake

Problem

How to use the nix flake init command: Create a flake in the current directory from a template. More information: <https://nix.dev/manual/nix/stable/command-ref/new-cli/nix3-flake-init.html>.

Solution

nix flake init — Create a flake in the current directory from a template. More information: <https://nix.dev/manual/nix/stable/command-ref/new-cli/nix3-flake-init.html>.

Create a new flake from the default template, in the current directory:
nix flake init


Create a new flake with a specified template (see nix flake show for information about templates):
nix flake init {{[-t|--template]}} templates#{{your_template}}

Code Snippets

Create a new flake from the default template, in the current directory

nix flake init

Create a new flake with a specified template (see `nix flake show` for information about templates)

nix flake init {{[-t|--template]}} templates#{{your_template}}

Context

tldr-pages: common/nix flake init

Revisions (0)

No revisions yet.