A selection of nix templates and app generators to simplify working with nix as a developer.
Adding these templates to your local nix flake registy can be done by either cloning the repo or adding the repo directly.
You can name the registry whatever you want. In this document I will assume you’ve chosen to name it `natecox`.
You can clone this repo wherever you want, but I’ll you want to install to `~/src` for simplicity.
- `git clone git@github.com:natecox/nix-templates.git ~/src/nix-templates`
- `nix registry add natecox ~/src/nix-templates`
If you don’t intend to edit these templates, and you will have internet access when you want to use them, it’s probably easiest to just add the repo to your registry directly.
“` nix registry add natecox github:natecox/nix-templates “`
A minimal shell designed to be just enough to initialize a new app in a given language or framework.
nix develop natecox#rust
cargo new my_new_app
After an app has been generated, these templates will provide a minimal development environment suitable for normal work.
nix flake init --template natecox#rust-dev