From 0cc353f49f9c5d0e0bd203a6854b488a58daaa96 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 24 Oct 2024 14:59:29 +0200 Subject: refactor({modules,pkgs}/by-name-overlay): De-duplicate in a `nixLib` --- modules/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'modules/default.nix') diff --git a/modules/default.nix b/modules/default.nix index a3bc1735..3364c3db 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,10 +1,15 @@ # NOTE: This file **must** not depend on `pkgs`. This is because `pkgs` is defined in a # module imported by it, and thus would require infinite recursion. <2024-10-18> {...}: let - files = import ./by-name-overlay.nix { - baseDirectory = - ./by-name; - }; + nixLib = import ../lib {}; + + files = + builtins.attrValues + (nixLib.mkByName { + baseDirectory = ./by-name; + fileName = "module.nix"; + finalizeFunction = name: value: value; + }); in { imports = files; } -- cgit 1.4.1