use pipes because why not

This commit is contained in:
Daylin Morgan 2024-08-14 09:50:26 -05:00
parent 6fb8365c03
commit 480ca0c41e
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -1,16 +1,28 @@
{ inputs, ... }: { inputs, ... }:
let let
defaultOverlays = inherit (builtins)
# execute and import all overlay files in the current map
# directory with the given args filter
builtins.map attrNames
# execute and import the overlay file readDir
(f: (import (./. + "/${f}") { inherit inputs; })) ;
# find all overlay files in the current directory # execute and import all overlay files in the current
(builtins.filter (f: f != "default.nix") (builtins.attrNames (builtins.readDir ./.))); # directory with the given args
# overlays =
# map
# (f: (import (./. + "/${f}") { inherit inputs; }))
# (filter (f: f != "default.nix") (attrNames (readDir ./.)));
overlays =
readDir ./.
|> attrNames
|> filter (f: f != "default.nix")
|> map (f: import (./. + "/${f}") { inherit inputs; });
# map
# (f: (import (./. + "/${f}") { inherit inputs; }))
# (filter (f: f != "default.nix") (attrNames (readDir ./.)));
in in
{ {
nixpkgs.overlays = defaultOverlays ++ [ nixpkgs.overlays = overlays ++ [
(final: _prev: { (final: _prev: {
stable = import inputs.stable { stable = import inputs.stable {
system = final.system; system = final.system;