aboutsummaryrefslogtreecommitdiff
path: root/src/nix/flake-init.md
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-02-17 21:06:10 +0100
committerGitHub <noreply@github.com>2022-02-17 21:06:10 +0100
commita768e85e2fb3b0500829bc42cdc137176481bedf (patch)
tree5bf20ac060ae6e8d1800890b30aedd7eca2530d6 /src/nix/flake-init.md
parentb24d541c34b6c85761c63c19ae847816aecd364b (diff)
parentf56dd3a36bc8a325028588fd5500cbc33fa48a26 (diff)
Merge pull request #6103 from Radvendii/welcomeText
add descriptive output when creating templates
Diffstat (limited to 'src/nix/flake-init.md')
-rw-r--r--src/nix/flake-init.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nix/flake-init.md b/src/nix/flake-init.md
index 890038016..c13b22248 100644
--- a/src/nix/flake-init.md
+++ b/src/nix/flake-init.md
@@ -37,6 +37,10 @@ A flake can declare templates through its `templates` and
* `path`: The path of the directory to be copied.
+* `welcomeText`: A block of markdown text to display when a user initializes a
+ new flake based on this template.
+
+
Here is an example:
```
@@ -45,6 +49,16 @@ outputs = { self }: {
templates.rust = {
path = ./rust;
description = "A simple Rust/Cargo project";
+ welcomeText = ''
+ # Simple Rust/Cargo Template
+ ## Intended usage
+ The intended usage of this flake is...
+
+ ## More info
+ - [Rust language](https://www.rust-lang.org/)
+ - [Rust on the NixOS Wiki](https://nixos.wiki/wiki/Rust)
+ - ...
+ '';
};
templates.defaultTemplate = self.templates.rust;