summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2024-07-22 03:38:49 -0400
committerseth <[email protected]>2024-07-22 03:38:55 -0400
commit5eb3ff7f01f67ba3c5d926f1a1247108bcfcd796 (patch)
tree71df1f2e6087c9155715ccf023b3ad52626e41f5
parent3e9ee17994ef6956aa4396a02ef8db4d60a978f9 (diff)
templates: use self for path
fixes random errors about the path not existing
-rw-r--r--flake.nix2
-rw-r--r--templates/default.nix7
2 files changed, 3 insertions, 6 deletions
diff --git a/flake.nix b/flake.nix
index a9e8876..d52fceb 100644
--- a/flake.nix
+++ b/flake.nix
@@ -61,6 +61,6 @@
formatter = forAllSystems (system: treefmtFor.${system}.config.build.wrapper);
- templates = import ./templates;
+ templates = import ./templates self;
};
}
diff --git a/templates/default.nix b/templates/default.nix
index 1c67349..62f535e 100644
--- a/templates/default.nix
+++ b/templates/default.nix
@@ -1,11 +1,8 @@
+self:
let
# string -> string -> {}
toTemplate = name: description: {
- path = builtins.path {
- path = ./${name};
- name = "${name}-template";
- };
-
+ path = self + "/templates/" + name;
inherit description;
};
in