thanks max

This commit is contained in:
Gerg-L 2023-11-16 18:52:45 -05:00
parent 37ff01e14e
commit 9d80ee02e5
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI

View file

@ -25,18 +25,13 @@ rec {
system: inputs: system: inputs:
lib.pipe inputs [ lib.pipe inputs [
(lib.filterAttrs (_: lib.isType "flake")) (lib.filterAttrs (_: lib.isType "flake"))
(lib.mapAttrs ( (lib.mapAttrs (_: lib.mapAttrs (name: value: if needsSystem name then value.${system} else value)))
_:
lib.mapAttrs (name: value: if needsSystem name then value.${system} else value)
))
]; ];
listNixFilesRecursive = listNixFilesRecursive =
path: path: builtins.filter (lib.hasSuffix ".nix") (lib.filesystem.listFilesRecursive path);
builtins.filter (lib.hasSuffix "nix") (lib.filesystem.listFilesRecursive path);
importAll = importAll = path: map (module: (import module inputs)) (listNixFilesRecursive path);
path: map (module: (import module inputs)) (listNixFilesRecursive path);
mkModules = mkModules =
path: path:
@ -66,9 +61,7 @@ rec {
else else
import unstable { inherit system config; }; import unstable { inherit system config; };
in in
lib.mapAttrs lib.mapAttrs (name: value: if needsSystem name then { ${system} = value pkgs; } else value) outputs
(name: value: if needsSystem name then { ${system} = value pkgs; } else value)
outputs
) )
[ "x86_64-linux" ] [ "x86_64-linux" ]
); );