diff --git a/README.md b/README.md index b33f951..84b9b91 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,23 @@ -# nix_templates +# Template-Flake +This flake provides custom flake templates, while still letting you access the [official flake templates](https://github.com/NixOS/templates). +It was inspired by [this blogpost](https://peppe.rs/posts/novice_nix:_flake_templates/). -A set of useful Nix Flake templates \ No newline at end of file +## Installation +Run +``` +nix registry add templates ~/path/to/this/repository +``` +This will override the default `template`-entry in the nix-registry. +You will still be able to access the official templates *through* this template. + +## Usage +``` +$ mkdir +$ cd +$ nix flake init -t templates# +$ git init +$ git add . +``` +You will have to replace all occurances of `TEMPLATE_NAME` with your ``. + +## Provided Templates diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ddac042 --- /dev/null +++ b/flake.nix @@ -0,0 +1,15 @@ +{ + description = "My Flake templates"; + + inputs = { + official-templates.url = github:NixOS/templates; + }; + + outputs = { official-templates, ... }: rec { + + templates = { + } // official-templates.templates; + + defaultTemplate = templates.trivial; + }; +}