From 5eb3ff7f01f67ba3c5d926f1a1247108bcfcd796 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 22 Jul 2024 03:38:49 -0400 Subject: templates: use self for path fixes random errors about the path not existing --- flake.nix | 2 +- templates/default.nix | 7 ++----- 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 -- cgit v1.2.3