about summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authorEmile <git@emile.space>2025-03-01 13:36:19 +0100
committerEmile <git@emile.space>2025-03-01 13:36:19 +0100
commitac5db54e516c11a5eb70c52d5c88bbf38c8b10a8 (patch)
tree20b715009f7e4e5f74ba1a56833766cbe02d7af1 /flake.nix
parente6c5747ea14f50bdd697e67f0138211ae19a6c71 (diff)
(flake) refactored the template-packages function
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix19
1 files changed, 7 insertions, 12 deletions
diff --git a/flake.nix b/flake.nix
index 1922ad2..cad6ed4 100644
--- a/flake.nix
+++ b/flake.nix
@@ -56,22 +56,17 @@
       # flake.nix/output/packages (if there are any) and returning an attribute set
       # of their packages (if the template has one or more)
       template-packages =
-        templ:
-        (builtins.mapAttrs (
-          name: value:
-          (((import ./nix/templates/${name}/flake.nix).outputs) {
-            inherit flake-utils;
-
-            # need to provide nixpkgs WITHOUT the overlay for the packages defined in the template applied
-            nixpkgs = nixpkgs;
-          }).packages or { }
-        ) templ);
+        builtins.mapAttrs (name: value:
+          (((import ./nix/templates/${name}/flake.nix).outputs)
+            { inherit nixpkgs flake-utils; })
+            .packages or { }
+        );
 
       # apply the above function to the templates
       templates = template-packages self.templates;
 
       # Merge template packages into root packages with template prefix
-      mergedTemplatePackages =
+      merged-template-packages =
         system:
         let
           lib = nixpkgs.lib;
@@ -255,7 +250,7 @@
             in
             # take all the packages exposed from templates and add them to
             # the packages exposed by this flake
-            mergedTemplatePackages system
+            merged-template-packages system
             // {
               inherit (pkgs) vokobe r2wars-web remarvin;
             }