Templates are there to help you start your Nix project.
$ nix flake init --template templates#fullor
$ nix flake new --template templates#full ./my-new-projectEach template ships with a tutorial (README.md) which explains in details how
to use it and extend it.
Main purpose of this repository is to collect most common templates to help newcomers learn Nix. For this purpose the collection of templates is limited to provided an opinionated and curated list.
Other templates for more advanced topics can be found in nix-community/templates.
TODO: templates should be also discoverable on search.nixos.org
- Make sure you have a GitHub account
- Make sure there is no open issue on the topic
- Submit a new issue
Each template needs:
-
nameFolder with the same name should be created and this is a location of the template. An entry with
nameis requred inflake.nix. -
descriptionA description that explains the content of the template in one sentence. An entry with
descriptionis requred inflake.nix. -
maintainersEach template needs one of more maintainers with the knowledge of specific area. Each template has an entry in
.github/CODEOWNERSwith maintainers next to them. -
tutorialTutorial showing the usage of the template should be placed in
README.md.
Note: contributing implies licensing those contributions under the terms of COPYING, which is the MIT license.