Here's an example (for the rust template):
# Initialize in the current project
nix flake init -t github:user1012007/dev-templates#rust
# Create a new project
nix flake new -t github:user1012007/dev-templates#rust ${NEW_PROJECT_DIRECTORY}Once your preferred template has been initialized, you can use the provided shell in two ways:
- If you have
nix-direnvinstalled, you can initialize the environment by runningdirenv allow. - If you don't have
nix-direnvinstalled, you can runnix developto open up the Nix-defined shell.
| Language/framework/tool | Template |
|---|---|
| C / C++ | c-cpp |
| Empty (change at will) | empty |
| Go | go |
| Haskell | haskell |
| Java | java |
| Jupyter | jupyter |
| Kotlin | kotlin |
| LaTeX | latex |
| Nix | nix |
| Node.js | node |
| PHP | php |
| Python | python |
| R | r |
| Ruby | ruby |
| Rust | rust |
| Scala | scala |
| Shell | shell |
| Swift | swift |
| Typst | typst |
The sections below list what each template includes. In all cases, you're free to add and remove packages as you see fit; the templates are just boilerplate.
- Go
- Standard Go tools (goimports, godoc, and others)
- golangci-lint
- Ruby, plus the standard Ruby tools (
bundle,gem, etc.)