init templates

This commit is contained in:
jackjohn7 2026-04-12 02:46:16 -05:00
parent c41685983f
commit 93bff3aade
7 changed files with 345 additions and 0 deletions

View file

@ -33,3 +33,27 @@ boilerplate feature my-feature
boilerplate layer my-layer
boilerplate package my-package
```
## Templates
I've found myself copying a lot of nix files from one project to the next. I'd like to reduce the
amount of time I spend doing this, so I'm just going to be making reusable nix flake templates.
These are defined in the `templates` directory and exposed in `modules/templates.nix`. They're
separated like that for both cleanliness and to avoid funkiness with `import-tree`.
You can use my templates like so (using my generic flake for example):
```sh
nix flake init -t github:jackjohn7/nixconf#generic
```
### Generic
My _generic_ template is just a basic flake following the
[dendritic pattern](https://dendrix.oeiuwq.com/Dendritic.html) based on this repository itself.
I have also included the `boilerplate` package so that boilerplate for basic pieces can just be
generated instead of copied, pasted, and cleaned up.
If you find any bugs or want to enhance it, feel free to open a PR. I can't promise I'll accept
your change since I use it myself but you'll still have your own fork at the end of the day for
your own consumption.