pipes pipes

This commit is contained in:
Daylin Morgan 2024-10-03 11:35:33 -05:00
parent a738b58baf
commit c56c791088
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -47,21 +47,22 @@ let
# ["a" "b"] -> {a.enable = true; b.enable = true;}
enableAttrs =
attrs:
listToAttrs (
map (attr: {
name = attr;
value = enabled;
}) attrs
);
attrs
|> map (attr: {
name = attr;
value = enabled;
})
|> listToAttrs;
# ["a" "b"] -> {a.enable = false; b.enable = false;}
disableAttrs =
attrs:
listToAttrs (
map (attr: {
name = attr;
value = disabled;
}) attrs
);
attrs
|> map (attr: {
name = attr;
value = disabled;
})
|> listToAttrs;
mkIfIn = name: list: prev.mkIf (builtins.elem name list);
@ -110,7 +111,8 @@ let
};
loadOverlays =
inputs: dir: readDir dir
inputs: dir:
readDir dir
|> attrNames
|> filter (f: f != "default.nix")
|> map (f: import (../overlays + "/${f}") { inherit inputs; });