Flake templates
Find a file
2024-01-08 12:23:54 -05:00
.github Initial work on README.md 2022-01-25 12:00:01 +01:00
bash-hello attribute self.lastModifiedDate missing in newer versions of flakes 2022-01-27 01:36:03 +01:00
c-hello Use pname+version, don't overwrite unpackPhase (#35) 2023-02-16 07:40:31 -05:00
compat Add a template that provides default.nix and shell.nix 2021-08-02 16:23:35 +02:00
full template full: Fix typo in flake.nix (#56) 2022-12-21 14:34:09 -05:00
go-hello Add example for devShells in go-hello (#60) 2023-02-16 07:37:28 -05:00
haskell-hello Add support for x86_64-darwin 2022-03-08 11:05:28 -05:00
haskell.nix update haskell.nix Flake template 2023-03-01 19:24:43 -08:00
hercules-ci templates/hercules-ci: init 2021-12-11 22:17:32 +00:00
pandoc-xelatex better formatting for abstract 2022-01-14 17:39:30 +01:00
python fix: update python template to use nix-community 2024-01-08 12:23:54 -05:00
rust Fix wrong defaultApp in Rust template 2022-10-06 23:23:17 +02:00
rust-web-server self.lastModifiedDate fix for all templates 2022-03-15 13:55:52 -07:00
simple-container Doh 2020-06-23 16:14:28 +02:00
trivial Update trivial template with nix 2.7 default package syntax 2022-08-23 08:24:49 +00:00
.gitignore update haskell.nix flake template (#57) 2023-02-16 07:35:56 -05:00
COPYING Initial work on README.md 2022-01-25 12:00:01 +01:00
flake.nix python: Add flake.lock to allow nix develop 2023-07-16 16:39:55 -04:00
README.md Update README.md 2022-01-25 14:59:53 +01:00

Official Nix templates

Templates are there to help you start your Nix project.

$ nix flake init --template templates#full

or

$ nix flake new --template templates#full ./my-new-project

Each template ships with a tutorial (README.md) which explains in details how to use it and extend it.

How to contribute

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

Opening issues

What is required to submit a template?

Each template needs:

  • name

    Folder with the same name should be created and this is a location of the template. An entry with name is requred in flake.nix.

  • description

    A description that explains the content of the template in one sentence. An entry with description is requred in flake.nix.

  • maintainers

    Each template needs one of more maintainers with the knowledge of specific area. Each template has an entry in .github/CODEOWNERS with maintainers next to them.

  • tutorial

    Tutorial showing the usage of the template should be placed in README.md.

License

Note: contributing implies licensing those contributions under the terms of COPYING, which is the MIT license.