nix/lib: simplify code

main
Felix Stupp 1 year ago
parent 142e970bdc
commit 6fc905387e
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -1,20 +1,21 @@
{ inputs, lib, ... }@flakeArg:
let
nixpkgs = inputs.nixpkgs;
libO = nixpkgs.lib;
in
nixpkgs.lib
libO
// {
supportedSystems = builtins.attrNames inputs.nixpkgs.legacyPackages;
supportedSystems = builtins.attrNames nixpkgs.legacyPackages;
systemSpecificVars = system: {
pkgs = import inputs.nixpkgs { inherit system; };
pkgs = import nixpkgs { inherit system; };
pkgs_unstable = import inputs.nixpkgs_unstable { inherit system; };
inherit system;
};
forAllSystems =
gen: inputs.nixpkgs.lib.genAttrs lib.supportedSystems (system: gen (lib.systemSpecificVars system));
gen: lib.genAttrs lib.supportedSystems (system: gen (lib.systemSpecificVars system));
importFlakeModWithSystem = path: lib.forAllSystems (lib.importFlakeMod path);

Loading…
Cancel
Save