summaryrefslogtreecommitdiff
path: root/templates/default.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2024-01-24 01:56:28 -0500
committerseth <[email protected]>2024-01-24 05:35:36 -0500
commit4967396702ad723d86a8d6792052cfdcad090ccf (patch)
treea80f6184f3396b68e420c601e48d51b9027a8ec8 /templates/default.nix
parentf91cb79249520f21b3ab5bc254607e00760179f9 (diff)
tree-wide: better support legacy nix
Diffstat (limited to 'templates/default.nix')
-rw-r--r--templates/default.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/templates/default.nix b/templates/default.nix
new file mode 100644
index 0000000..349f9df
--- /dev/null
+++ b/templates/default.nix
@@ -0,0 +1,16 @@
+let
+ # string -> string -> {}
+ toTemplate = name: description: {
+ path = builtins.path {
+ path = ./${name};
+ name = "${name}-template";
+ };
+
+ inherit description;
+ };
+in
+ builtins.mapAttrs toTemplate {
+ basic = "minimal boilerplate for my flakes";
+ full = "big template for complex flakes (using flake-parts)";
+ nixos = "minimal boilerplate for flake-based nixos configuration";
+ }