From ceef51425e222c85eab4c4053426f08ba880ebe3 Mon Sep 17 00:00:00 2001 From: Pacman99 Date: Sun, 25 Apr 2021 16:46:02 -0700 Subject: [PATCH] init unifyOverlays: to pass channels to overlays Only to those with three arguments --- lib/flake.nix | 2 +- lib/lists.nix | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/flake.nix b/lib/flake.nix index 393c9d6a..862570c0 100644 --- a/lib/flake.nix +++ b/lib/flake.nix @@ -50,7 +50,7 @@ pathsToImportedAttrs concatAttrs filterPackages; - inherit (lists) pathsIn collectProfiles; + inherit (lists) pathsIn collectProfiles unifyOverlays; inherit (strings) rgxToString; inherit modules; } diff --git a/lib/lists.nix b/lib/lists.nix index c20a4d7b..5e9c57b2 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -16,4 +16,6 @@ fullPath = name: "${toString dir}/${name}"; in map fullPath (lib.attrNames (lib.safeReadDir dir)); + + unifyOverlays = channels: map (o: if builtins.isFunction (o null null) then o channels else o); }