fix: removed rec in lib

You should be able to specify everything and inherit everything back into
the `in` expression.
This commit is contained in:
cvoges12 2024-07-18 19:24:48 -05:00
parent c85f5a5687
commit 25c30cabaa

View file

@ -6,9 +6,7 @@ inputs@{
}:
let
inherit (stable) lib;
in
# Only good use case for rec
rec {
wrench = lib.flip lib.pipe;
needsSystem = lib.flip builtins.elem [
@ -33,20 +31,6 @@ rec {
(builtins.filter (x: !lib.hasPrefix "_" (builtins.baseNameOf x) && lib.hasSuffix ".nix" x))
];
mkModules =
path:
lib.pipe path [
listNixFilesRecursive
(map (name: {
name = lib.pipe name [
(lib.removeSuffix ".nix")
(lib.removePrefix "${path}/")
];
value = addSchizophreniaToModule name;
}))
builtins.listToAttrs
];
addSchizophreniaToModule =
x:
let
@ -149,6 +133,27 @@ rec {
_file = x;
};
};
in {
inherit
wrench
needsSystem
constructInputs'
listNixFilesRecursive
addSchizophreniaToModule;
mkModules =
path:
lib.pipe path [
listNixFilesRecursive
(map (name: {
name = lib.pipe name [
(lib.removeSuffix ".nix")
(lib.removePrefix "${path}/")
];
value = addSchizophreniaToModule name;
}))
builtins.listToAttrs
];
gerg-utils =
pkgsf: outputs:
@ -192,6 +197,7 @@ rec {
];
}
);
mkDisko = wrench [
(map (name: {
name = "disko-${name}";