From e5fd39ee582ed1a8e0fb5cf659a176eec3e4c804 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Tue, 2 Apr 2024 13:37:03 +0200 Subject: fix(templates.nix): Adjust to the new `init` script --- templates.nix | 47 ++++++++++++++++------------------------------- 1 file changed, 16 insertions(+), 31 deletions(-) (limited to 'templates.nix') diff --git a/templates.nix b/templates.nix index be7449d..05e2e9e 100644 --- a/templates.nix +++ b/templates.nix @@ -11,42 +11,27 @@ else "A"; in "${a_or_an} ${name} project"; }; -in { - # a b c d e f g h i j k l m n o p q r s t u v w x y z - awk = mkTemplate "awk" '' - **Grep** for the TODO marks and change them accordingly! - Also run `git init`. - ''; + mkDefaultTemplate = name: mkTemplate name defaultText; + mkAddedTemplate = name: text: mkTemplate name (defaultText + text); - c = mkTemplate "c" '' - **Grep** for the TODO marks and change them accordingly! - Also run `git init`. + defaultText = '' + Just run `init` and follow the directions. Otherwise, you could also change the + `%INIT_*` variables yourself. ''; +in { + # a b c d e f g h i j k l m n o p q r s t u v w x y z + awk = mkDefaultTemplate "awk"; + c = mkDefaultTemplate "c"; - latex = mkTemplate "latex" '' - **Grep** for the TODO marks and change them accordingly! - Also run `git init`. - Please take a look at `lpm`. + latex = mkAddedTemplate "latex" '' + Also **grep** for TODO marks after the `init` run and change them accordingly! + Furthermore, please take a look at `lpm`. ''; # Currently unmaintained - # markdown = mkTemplate "markdown" '' - # **Grep** for the TODO marks and change them accordingly! - # Also run `git init`. - # ''; - # - # python = mkTemplate "python" '' - # **Grep** for the TODO marks and change them accordingly! - # Also run `git init`. - # ''; - - rust = mkTemplate "rust" '' - **Grep** for the TODO marks and change them accordingly! - Also run `git init`. - ''; + # markdown = mkDefaultTemplate "markdown"; + # python = mkDefaultTemplate "python"; - shell = mkTemplate "shell" '' - **Grep** for the TODO marks and change them accordingly! - Also run `git init`. - ''; + rust = mkDefaultTemplate "rust"; + shell = mkDefaultTemplate "shell"; } -- cgit 1.4.1