2020-06-27 15:02:29 +00:00
|
|
|
{ lib }:
|
|
|
|
let
|
|
|
|
overlayPath = ./.;
|
|
|
|
candidates = lib.attrNames (builtins.readDir overlayPath);
|
|
|
|
pathToOverlay = n: overlayPath + ("/" + n);
|
|
|
|
isNixFile = n: builtins.match ".*\\.nix" n != null;
|
|
|
|
isNixDir = n: builtins.pathExists (pathToOverlay n + "/default.nix");
|
|
|
|
notDefault = n: n != "default.nix";
|
|
|
|
isOverlay = n: (isNixDir n || isNixFile n) && notDefault n;
|
|
|
|
overlays = builtins.filter isOverlay candidates;
|
|
|
|
importOverlay = n: import (pathToOverlay n);
|
2021-05-18 14:33:28 +00:00
|
|
|
in
|
|
|
|
map importOverlay overlays
|