···1212 <language>en-us</language>
1313 <copyright>Creative Commons BY-NC-SA 4.0</copyright>
1414 <item>
1515+<title>Novice Nix: Flake Templates</title>
1616+<description><p>Flakes are very handy to setup entirely pure, project-specific dependencies (not just dependencies, but build steps, shell environments and more) in a declarative way. Writing Flake expressions can get repetitive though, oftentimes, you’d much rather start off with a skeleton. Luckily, <code>nix</code> already supports templates!</p>
1717+<p>You might already be familiar with <code>nix flake init</code>, that drops a “default” flake expression into your current working directory. If you head over to the manpage:</p>
1818+<pre><code>nix flake init --help</code></pre>
1919+<p>You will read that <code>nix flake init</code> creates a flake using the “default template”. Additionally, you can create a flake from a specific template by passing the <code>-t</code> flag. Where does this default originate from?</p>
2020+<h2 id="flake-registries">Flake Registries</h2>
2121+<p>Quick detour into registries! Registries are a way to alias popular flakes using identifiers:</p>
2222+<pre><code># list a few predefined registries
2323+$ nix registry list
2424+. . .
2525+global flake:nixpkgs github:NixOS/nixpkgs
2626+global flake:patchelf github:NixOS/patchelf
2727+global flake:nix-serve github:edolstra/nix-serve
2828+global flake:templates github:NixOS/templates
2929+global flake:nickel github:tweag/nickel
3030+. . .
3131+3232+# you can do
3333+$ nix flake show nickel
3434+3535+# instead of
3636+$ nix flake show github:tweag/nickel
3737+3838+# which is short for
3939+$ nix flake show git+https://github.com/tweag/nickel</code></pre>
4040+<p>You might notice a registry called <code>templates</code> aliased to <code>github:NixOS/templates</code>. Take a peek with <code>nix flake show</code>:</p>
4141+<pre><code>$ nix flake show templates
4242+github:NixOS/templates/79f48a7b822f35c068c5e235da2e9fbd154cecee
4343+├───defaultTemplate: template: A very basic flake
4444+└───templates
4545+ ├───bash-hello: template: An over-engineered Hello World in bash
4646+ ├───c-hello: template: An over-engineered Hello World in C
4747+ ├───rust-web-server: template: A Rust web server including a NixOS module
4848+ ├───simpleContainer: template: A NixOS container running apache-httpd
4949+ └───trivial: template: A very basic flake</code></pre>
5050+<p>Aha! There is a flake output called <code>defaultTemplate</code>. This is the template being sourced when you run <code>nix flake init</code>. Astute readers may conclude the following:</p>
5151+<pre><code>$ nix flake init
5252+5353+# is equivalent to
5454+$ nix flake init -t templates#defaultTemplate
5555+5656+# is equivalent to
5757+$ nix flake init -t github:NixOS/templates#defaultTemplate
5858+5959+# which is short for
6060+$ nix flake init -t git+https://NixOS/templates#defaultTemplate</code></pre>
6161+<p>Similarly, the other templates can be accessed via:</p>
6262+<pre><code>$ nix flake init -t templates#c-hello
6363+$ nix flake init -t templates#simpleContainer
6464+# I think you get the drift ...</code></pre>
6565+<h2 id="rolling-your-own-templates">Rolling your own templates</h2>
6666+<p>Alright, so all we need to do is:</p>
6767+<ul>
6868+<li>create a flake with a <code>templates</code> output</li>
6969+<li>populate our template directories with content</li>
7070+<li>(<strong>optionally</strong>) alias our custom templates flake to an identifier using registries, for easier access</li>
7171+</ul>
7272+<p>Start off by creating a directory to store your templates in (we will be converting this to a registry later):</p>
7373+<pre><code>$ mkdir ~/mytemplates</code></pre>
7474+<p>A flake that exposes a “template” as its output looks something like this:</p>
7575+<pre><code># inside ~/mytemplates/flake.nix
7676+7777+{
7878+ description = &quot;Pepper&#39;s flake templates&quot;;
7979+8080+ outputs = { self, ... }: {
8181+ templates = {
8282+ latex-report = {
8383+ path = ./latex-report-template;
8484+ description = &quot;A latex whitepaper project&quot;;
8585+ };
8686+ rust-hello = {
8787+ path = ./rust-hello-template;
8888+ description = &quot;Simple Hello World in Rust&quot;;
8989+ };
9090+ };
9191+ };
9292+}</code></pre>
9393+<p>The <code>path</code> attribute to each template is what gets copied over when you initialize a flake. Running <code>nix flake init -t .#latex-report</code> will initialize the current directory with the contents of <code>./latex-report-template</code> (we are yet to populate these directories).</p>
9494+<p>The output of <code>nix flake show</code> should be something like:</p>
9595+<pre><code>$ nix flake show
9696+path:/home/np/code/nix-stuff/template-tests?narHash=sha256-{...}
9797+└───templates
9898+ ├───latex-report: template: A latex whitepaper project
9999+ └───rust-hello: template: Simple Hello World in Rust</code></pre>
100100+<p>Populate your template directories with content, here are my template directories for example:</p>
101101+<pre><code>$ tree mytemplates
102102+mytemplates/
103103+├── flake.nix
104104+├── latex-report-template
105105+│ ├── flake.nix
106106+│ ├── makefile
107107+│ └── src
108108+│ ├── meta.sty
109109+│ └── report.tex
110110+└── rust-hello-template
111111+ ├── Cargo.toml
112112+ ├── flake.nix
113113+ └── src
114114+ └── main.rs</code></pre>
115115+<p>And that’s it! Start using your templates with:</p>
116116+<pre><code>$ nix flake init -t ~/mytemplates#rust-hello
117117+$ tree .
118118+.
119119+├── Cargo.toml
120120+├── flake.nix
121121+└── src
122122+ └── main.rs</code></pre>
123123+<p>To avoid writing <code>~/mytemplates</code> each time, simply alias it to a registry:</p>
124124+<pre><code># alias it to `biscuits`
125125+$ nix registry add biscuits ~/mytemplates
126126+127127+# you will see it listed under `user` registries
128128+$ nix registry list
129129+. . .
130130+user flake:biscuits path:/home/np/template-tests
131131+. . .
132132+133133+$ nix flake init -t biscuits#latex-report</code></pre>
134134+<h2 id="extending-the-official-templates">Extending the official templates</h2>
135135+<p>I personally, would like the <code>biscuits</code> registry to include not just my homemade templates, but also the templates from <code>NixOS/templates</code> (and maybe a couple of other repositories in the wild):</p>
136136+<pre><code> {
137137+ description = &quot;Pepper&#39;s flake templates&quot;;
138138+139139++ inputs = {
140140++ official-templates.url = github:NixOS/templates;
141141++ other-templates.url = github:some-other/templates;
142142++ };
143143+144144+ outputs = { self, official-templates, other-templates ... }: {
145145+146146+ templates = {
147147+ latex-report = {
148148+ path = ./latex-report-template;
149149+ description = &quot;A latex whitepaper project&quot;;
150150+ };
151151+ rust-hello = {
152152+ path = ./rust-hello-template;
153153+ description = &quot;Simple Hello World in Rust, with overloaded Rust toolchain&quot;;
154154+ };
155155+ }
156156++ // official-templates.templates
157157++ // other-templates.templates;
158158+159159+ };
160160+ }</code></pre>
161161+<p>Running <code>nix flake show biscuits</code> will now list templates from the <code>biscuits</code> registry as well as the ones from <code>NixOS/templates</code>. Ensure that the names don’t collide though.</p></description>
162162+<link>https://peppe.rs/posts/novice_nix:_flake_templates/</link>
163163+<pubDate>Tue, 05 Oct 2021 16:49:00 +0000</pubDate>
164164+<guid>https://peppe.rs/posts/novice_nix:_flake_templates/</guid>
165165+</item>
166166+<item>
15167<title>SDL2 Devlog</title>
16168<description><p>I have been working on an editor for the <a href="https://git.peppe.rs/graphics/obi/about">One Bit Image</a> file format in Rust and SDL2. This entry in my blog follows my progress on the editor. The days are listed in reverse chronological order, begin from the bottom, if this is your first time on this page.</p>
17169<h3 id="day-20">Day 20</h3>
···11+<!DOCTYPE html>
22+<html lang="en">
33+ <head>
44+ <link rel="stylesheet" href="/style.css">
55+ <link rel="stylesheet" href="/syntax.css">
66+ <meta charset="UTF-8">
77+ <meta name="viewport" content="initial-scale=1">
88+ <meta content="#ffffff" name="theme-color">
99+ <meta name="HandheldFriendly" content="true">
1010+ <meta property="og:title" content="Novice Nix: Flake Templates">
1111+ <meta property="og:type" content="website">
1212+ <meta property="og:description" content="a static site {for, by, about} me ">
1313+ <meta property="og:url" content="https://peppe.rs">
1414+ <link rel="icon" type="image/x-icon" href="/favicon.png">
1515+ <title>Novice Nix: Flake Templates · peppe.rs</title>
1616+ <body>
1717+ <div class="posts">
1818+ <div class="post">
1919+ <a href="/" class="post-end-link">Home</a>
2020+ <span>/</span>
2121+ <a href="/posts" class="post-end-link">Posts</a>
2222+ <span>/</span>
2323+ <a class="post-end-link">Novice Nix: Flake Templates</a>
2424+ <a class="stats post-end-link" href="https://git.peppe.rs/web/site/plain/posts/novice_nix:_flake_templates.md
2525+">View Raw</a>
2626+ <div class="separator"></div>
2727+ <div class="date">
2828+ 05/10 — 2021
2929+ <div class="stats">
3030+ <span class="stats-number">
3131+ 91.51
3232+ </span>
3333+ <span class="stats-unit">cm</span>
3434+  
3535+ <span class="stats-number">
3636+ 5.5
3737+ </span>
3838+ <span class="stats-unit">min</span>
3939+ </div>
4040+ </div>
4141+ <h1>
4242+ Novice Nix: Flake Templates
4343+ </h1>
4444+ <div class="post-text">
4545+ <p>Flakes are very handy to setup entirely pure, project-specific dependencies (not just dependencies, but build steps, shell environments and more) in a declarative way. Writing Flake expressions can get repetitive though, oftentimes, you’d much rather start off with a skeleton. Luckily, <code>nix</code> already supports templates!</p>
4646+<p>You might already be familiar with <code>nix flake init</code>, that drops a “default” flake expression into your current working directory. If you head over to the manpage:</p>
4747+<pre><code>nix flake init --help</code></pre>
4848+<p>You will read that <code>nix flake init</code> creates a flake using the “default template”. Additionally, you can create a flake from a specific template by passing the <code>-t</code> flag. Where does this default originate from?</p>
4949+<h2 id="flake-registries">Flake Registries</h2>
5050+<p>Quick detour into registries! Registries are a way to alias popular flakes using identifiers:</p>
5151+<pre><code># list a few predefined registries
5252+$ nix registry list
5353+. . .
5454+global flake:nixpkgs github:NixOS/nixpkgs
5555+global flake:patchelf github:NixOS/patchelf
5656+global flake:nix-serve github:edolstra/nix-serve
5757+global flake:templates github:NixOS/templates
5858+global flake:nickel github:tweag/nickel
5959+. . .
6060+6161+# you can do
6262+$ nix flake show nickel
6363+6464+# instead of
6565+$ nix flake show github:tweag/nickel
6666+6767+# which is short for
6868+$ nix flake show git+https://github.com/tweag/nickel</code></pre>
6969+<p>You might notice a registry called <code>templates</code> aliased to <code>github:NixOS/templates</code>. Take a peek with <code>nix flake show</code>:</p>
7070+<pre><code>$ nix flake show templates
7171+github:NixOS/templates/79f48a7b822f35c068c5e235da2e9fbd154cecee
7272+├───defaultTemplate: template: A very basic flake
7373+└───templates
7474+ ├───bash-hello: template: An over-engineered Hello World in bash
7575+ ├───c-hello: template: An over-engineered Hello World in C
7676+ ├───rust-web-server: template: A Rust web server including a NixOS module
7777+ ├───simpleContainer: template: A NixOS container running apache-httpd
7878+ └───trivial: template: A very basic flake</code></pre>
7979+<p>Aha! There is a flake output called <code>defaultTemplate</code>. This is the template being sourced when you run <code>nix flake init</code>. Astute readers may conclude the following:</p>
8080+<pre><code>$ nix flake init
8181+8282+# is equivalent to
8383+$ nix flake init -t templates#defaultTemplate
8484+8585+# is equivalent to
8686+$ nix flake init -t github:NixOS/templates#defaultTemplate
8787+8888+# which is short for
8989+$ nix flake init -t git+https://NixOS/templates#defaultTemplate</code></pre>
9090+<p>Similarly, the other templates can be accessed via:</p>
9191+<pre><code>$ nix flake init -t templates#c-hello
9292+$ nix flake init -t templates#simpleContainer
9393+# I think you get the drift ...</code></pre>
9494+<h2 id="rolling-your-own-templates">Rolling your own templates</h2>
9595+<p>Alright, so all we need to do is:</p>
9696+<ul>
9797+<li>create a flake with a <code>templates</code> output</li>
9898+<li>populate our template directories with content</li>
9999+<li>(<strong>optionally</strong>) alias our custom templates flake to an identifier using registries, for easier access</li>
100100+</ul>
101101+<p>Start off by creating a directory to store your templates in (we will be converting this to a registry later):</p>
102102+<pre><code>$ mkdir ~/mytemplates</code></pre>
103103+<p>A flake that exposes a “template” as its output looks something like this:</p>
104104+<pre><code># inside ~/mytemplates/flake.nix
105105+106106+{
107107+ description = "Pepper's flake templates";
108108+109109+ outputs = { self, ... }: {
110110+ templates = {
111111+ latex-report = {
112112+ path = ./latex-report-template;
113113+ description = "A latex whitepaper project";
114114+ };
115115+ rust-hello = {
116116+ path = ./rust-hello-template;
117117+ description = "Simple Hello World in Rust";
118118+ };
119119+ };
120120+ };
121121+}</code></pre>
122122+<p>The <code>path</code> attribute to each template is what gets copied over when you initialize a flake. Running <code>nix flake init -t .#latex-report</code> will initialize the current directory with the contents of <code>./latex-report-template</code> (we are yet to populate these directories).</p>
123123+<p>The output of <code>nix flake show</code> should be something like:</p>
124124+<pre><code>$ nix flake show
125125+path:/home/np/code/nix-stuff/template-tests?narHash=sha256-{...}
126126+└───templates
127127+ ├───latex-report: template: A latex whitepaper project
128128+ └───rust-hello: template: Simple Hello World in Rust</code></pre>
129129+<p>Populate your template directories with content, here are my template directories for example:</p>
130130+<pre><code>$ tree mytemplates
131131+mytemplates/
132132+├── flake.nix
133133+├── latex-report-template
134134+│ ├── flake.nix
135135+│ ├── makefile
136136+│ └── src
137137+│ ├── meta.sty
138138+│ └── report.tex
139139+└── rust-hello-template
140140+ ├── Cargo.toml
141141+ ├── flake.nix
142142+ └── src
143143+ └── main.rs</code></pre>
144144+<p>And that’s it! Start using your templates with:</p>
145145+<pre><code>$ nix flake init -t ~/mytemplates#rust-hello
146146+$ tree .
147147+.
148148+├── Cargo.toml
149149+├── flake.nix
150150+└── src
151151+ └── main.rs</code></pre>
152152+<p>To avoid writing <code>~/mytemplates</code> each time, simply alias it to a registry:</p>
153153+<pre><code># alias it to `biscuits`
154154+$ nix registry add biscuits ~/mytemplates
155155+156156+# you will see it listed under `user` registries
157157+$ nix registry list
158158+. . .
159159+user flake:biscuits path:/home/np/template-tests
160160+. . .
161161+162162+$ nix flake init -t biscuits#latex-report</code></pre>
163163+<h2 id="extending-the-official-templates">Extending the official templates</h2>
164164+<p>I personally, would like the <code>biscuits</code> registry to include not just my homemade templates, but also the templates from <code>NixOS/templates</code> (and maybe a couple of other repositories in the wild):</p>
165165+<pre><code> {
166166+ description = "Pepper's flake templates";
167167+168168++ inputs = {
169169++ official-templates.url = github:NixOS/templates;
170170++ other-templates.url = github:some-other/templates;
171171++ };
172172+173173+ outputs = { self, official-templates, other-templates ... }: {
174174+175175+ templates = {
176176+ latex-report = {
177177+ path = ./latex-report-template;
178178+ description = "A latex whitepaper project";
179179+ };
180180+ rust-hello = {
181181+ path = ./rust-hello-template;
182182+ description = "Simple Hello World in Rust, with overloaded Rust toolchain";
183183+ };
184184+ }
185185++ // official-templates.templates
186186++ // other-templates.templates;
187187+188188+ };
189189+ }</code></pre>
190190+<p>Running <code>nix flake show biscuits</code> will now list templates from the <code>biscuits</code> registry as well as the ones from <code>NixOS/templates</code>. Ensure that the names don’t collide though.</p>
191191+192192+ </div>
193193+194194+ <div class="intro">
195195+ Hi.
196196+ <div class="hot-links">
197197+ <a href="https://peppe.rs/index.xml" class="feed-button">Subscribe</a>
198198+ <a href="https://liberapay.com/nerdypepper/donate" class="donate-button">Donate</a>
199199+ </div>
200200+ <p>I'm Akshay, I go by nerd or nerdypepper on the internet.</p>
201201+ <p>
202202+ I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer.
203203+ I write <a href="https://git.peppe.rs">open-source stuff</a> to pass time.
204204+ I also design fonts:
205205+ <a href="https://git.peppe.rs/fonts/scientifica">scientifica</a>,
206206+ <a href="https://git.peppe.rs/fonts/curie">curie</a>.
207207+ </p>
208208+ <p>Send me a mail at nerdy@peppe.rs or a message at nerdypepper@irc.rizon.net.</p>
209209+ </div>
210210+211211+ <a href="/" class="post-end-link">Home</a>
212212+ <span>/</span>
213213+ <a href="/posts" class="post-end-link">Posts</a>
214214+ <span>/</span>
215215+ <a class="post-end-link">Novice Nix: Flake Templates</a>
216216+ <a class="stats post-end-link" href="https://git.peppe.rs/web/site/plain/posts/novice_nix:_flake_templates.md
217217+">View Raw</a>
218218+ </div>
219219+ </div>
220220+ </body>
221221+</html>
+229
posts/novice_nix:_flake_templates.md
···11+Flakes are very handy to setup entirely pure,
22+project-specific dependencies (not just dependencies, but
33+build steps, shell environments and more) in a declarative
44+way. Writing Flake expressions can get repetitive though,
55+oftentimes, you'd much rather start off with a skeleton.
66+Luckily, `nix` already supports templates!
77+88+You might already be familiar with `nix flake init`, that
99+drops a "default" flake expression into your current working
1010+directory. If you head over to the manpage:
1111+1212+```
1313+nix flake init --help
1414+```
1515+1616+You will read that `nix flake init` creates a flake using
1717+the "default template". Additionally, you can create a flake
1818+from a specific template by passing the `-t` flag. Where
1919+does this default originate from?
2020+2121+## Flake Registries
2222+2323+Quick detour into registries! Registries are a way to alias
2424+popular flakes using identifiers:
2525+2626+```
2727+# list a few predefined registries
2828+$ nix registry list
2929+. . .
3030+global flake:nixpkgs github:NixOS/nixpkgs
3131+global flake:patchelf github:NixOS/patchelf
3232+global flake:nix-serve github:edolstra/nix-serve
3333+global flake:templates github:NixOS/templates
3434+global flake:nickel github:tweag/nickel
3535+. . .
3636+3737+# you can do
3838+$ nix flake show nickel
3939+4040+# instead of
4141+$ nix flake show github:tweag/nickel
4242+4343+# which is short for
4444+$ nix flake show git+https://github.com/tweag/nickel
4545+```
4646+4747+You might notice a registry called `templates` aliased to
4848+`github:NixOS/templates`. Take a peek with `nix flake show`:
4949+5050+```
5151+$ nix flake show templates
5252+github:NixOS/templates/79f48a7b822f35c068c5e235da2e9fbd154cecee
5353+├───defaultTemplate: template: A very basic flake
5454+└───templates
5555+ ├───bash-hello: template: An over-engineered Hello World in bash
5656+ ├───c-hello: template: An over-engineered Hello World in C
5757+ ├───rust-web-server: template: A Rust web server including a NixOS module
5858+ ├───simpleContainer: template: A NixOS container running apache-httpd
5959+ └───trivial: template: A very basic flake
6060+```
6161+6262+Aha! There is a flake output called `defaultTemplate`. This
6363+is the template being sourced when you run `nix flake init`.
6464+Astute readers may conclude the following:
6565+6666+```
6767+$ nix flake init
6868+6969+# is equivalent to
7070+$ nix flake init -t templates#defaultTemplate
7171+7272+# is equivalent to
7373+$ nix flake init -t github:NixOS/templates#defaultTemplate
7474+7575+# which is short for
7676+$ nix flake init -t git+https://NixOS/templates#defaultTemplate
7777+```
7878+7979+Similarly, the other templates can be accessed via:
8080+8181+```
8282+$ nix flake init -t templates#c-hello
8383+$ nix flake init -t templates#simpleContainer
8484+# I think you get the drift ...
8585+```
8686+8787+## Rolling your own templates
8888+8989+Alright, so all we need to do is:
9090+9191+ - create a flake with a `templates` output
9292+ - populate our template directories with content
9393+ - (**optionally**) alias our custom templates flake to an
9494+ identifier using registries, for easier access
9595+9696+Start off by creating a directory to store your templates in
9797+(we will be converting this to a registry later):
9898+9999+```
100100+$ mkdir ~/mytemplates
101101+```
102102+103103+A flake that exposes a "template" as its output looks
104104+something like this:
105105+106106+```
107107+# inside ~/mytemplates/flake.nix
108108+109109+{
110110+ description = "Pepper's flake templates";
111111+112112+ outputs = { self, ... }: {
113113+ templates = {
114114+ latex-report = {
115115+ path = ./latex-report-template;
116116+ description = "A latex whitepaper project";
117117+ };
118118+ rust-hello = {
119119+ path = ./rust-hello-template;
120120+ description = "Simple Hello World in Rust";
121121+ };
122122+ };
123123+ };
124124+}
125125+```
126126+127127+The `path` attribute to each template is what gets copied
128128+over when you initialize a flake. Running `nix flake init -t
129129+.#latex-report` will initialize the current directory with
130130+the contents of `./latex-report-template` (we are yet to
131131+populate these directories).
132132+133133+The output of `nix flake show` should be something like:
134134+135135+```
136136+$ nix flake show
137137+path:/home/np/code/nix-stuff/template-tests?narHash=sha256-{...}
138138+└───templates
139139+ ├───latex-report: template: A latex whitepaper project
140140+ └───rust-hello: template: Simple Hello World in Rust
141141+```
142142+143143+Populate your template directories with content, here are my
144144+template directories for example:
145145+146146+```
147147+$ tree mytemplates
148148+mytemplates/
149149+├── flake.nix
150150+├── latex-report-template
151151+│ ├── flake.nix
152152+│ ├── makefile
153153+│ └── src
154154+│ ├── meta.sty
155155+│ └── report.tex
156156+└── rust-hello-template
157157+ ├── Cargo.toml
158158+ ├── flake.nix
159159+ └── src
160160+ └── main.rs
161161+```
162162+163163+And that's it! Start using your templates with:
164164+165165+```
166166+$ nix flake init -t ~/mytemplates#rust-hello
167167+$ tree .
168168+.
169169+├── Cargo.toml
170170+├── flake.nix
171171+└── src
172172+ └── main.rs
173173+```
174174+175175+To avoid writing `~/mytemplates` each time, simply alias it
176176+to a registry:
177177+178178+```
179179+# alias it to `biscuits`
180180+$ nix registry add biscuits ~/mytemplates
181181+182182+# you will see it listed under `user` registries
183183+$ nix registry list
184184+. . .
185185+user flake:biscuits path:/home/np/template-tests
186186+. . .
187187+188188+$ nix flake init -t biscuits#latex-report
189189+```
190190+191191+## Extending the official templates
192192+193193+I personally, would like the `biscuits` registry to include
194194+not just my homemade templates, but also the templates from
195195+`NixOS/templates` (and maybe a couple of other repositories
196196+in the wild):
197197+198198+```
199199+ {
200200+ description = "Pepper's flake templates";
201201+202202++ inputs = {
203203++ official-templates.url = github:NixOS/templates;
204204++ other-templates.url = github:some-other/templates;
205205++ };
206206+207207+ outputs = { self, official-templates, other-templates ... }: {
208208+209209+ templates = {
210210+ latex-report = {
211211+ path = ./latex-report-template;
212212+ description = "A latex whitepaper project";
213213+ };
214214+ rust-hello = {
215215+ path = ./rust-hello-template;
216216+ description = "Simple Hello World in Rust, with overloaded Rust toolchain";
217217+ };
218218+ }
219219++ // official-templates.templates
220220++ // other-templates.templates;
221221+222222+ };
223223+ }
224224+```
225225+226226+Running `nix flake show biscuits` will now list templates
227227+from the `biscuits` registry as well as the ones from
228228+`NixOS/templates`. Ensure that the names don't collide
229229+though.