- Nix 96%
- C 2%
- Haskell 1%
- Rust <1%
flake-templates #
A collection of various project template flakes.
Quick Start #
Tip
If no template is specified, the generic one will be chosen.
Initialise a new project with the specified template:
nix flake init -t git+https://tangled.org/itsyunaya.app/flake-templates#<template>
or
nix flake new -t git+https://tangled.org/itsyunaya.app/flake-templates#<template> ./new-project
with #<template> being one of the availabe template options (see below).
Templates #
| Description | Contains | To-Dos | |
|---|---|---|---|
| generic | Bare flake, useful when none of the other templates are appropriate | Devshell | |
| rust | Full Rust development flake with pregenerated cargo project | Devshell, generic package definition | |
| haskell | Full Haskell development flake with pregenerated cabal project | Devshell | Package definition |
| minecraft | Modded Minecraft flake for Fabric development | Devshell | |
| C | C development flake | Devshell, generic package definition, meson config, clang-format |
FAQ #
Why not use the official templates? #
Unfortunately, the templates in said repository vary greatly in quality, maintainability and cleanliness. While some of them are passable, others introduce unnecessary dependencies such as flake-parts or flake-utils, use known anti-patterns or simply haven't been updated in a long time, and in my opinion, do not reflect how development with Nix should look like.
Although the repository is being advertised as a way for new users to get more familiar with Nix, it does a poor job at achieving that due to the previously listed concerns.
Will new templates be added eventually? #
Maybe! They are mainly for me to have an easier time developing with Nix, so if something comes to mind that would be useful to make a template out of, it will be added here.
Credits #
- poz/niksos for part of the rust template and the idea of a templates repo
- mangowm/mango for parts of
meson.buildand Nix infra