From 33ba5ea4fc00147ddb80e9c3c6f902d393fb198d Mon Sep 17 00:00:00 2001 From: Artur Manuel Date: Sat, 14 Sep 2024 00:39:36 +0100 Subject: [PATCH] fix: readDir instead of manually defining i messed up and didnt add the template so i took a new measure. --- flake.nix | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/flake.nix b/flake.nix index e3fa2ca..9d553f7 100644 --- a/flake.nix +++ b/flake.nix @@ -1,20 +1,9 @@ { description = "Flake Template Hell"; - - outputs = _: { - templates = { - "go" = { - path = ./templates/go; - description = "go flake template"; - }; - "rust" = { - path = ./templates/rust; - description = "rust flake template"; - }; - "haskell" = { - path = ./templates/haskell; - description = "haskell flake template"; - }; - }; + outputs = { self }: { + templates = builtins.mapAttrs (name: _: { + path = ./templates/${name}; + description = "Template for ${name} projects."; + }) (builtins.readDir ./templates); }; }