evaluate lib then inherit from it

This commit is contained in:
Daylin Morgan 2024-03-01 00:26:52 -06:00
parent 3fc0eb9608
commit a9627da325
Signed by: daylin
GPG key ID: 950D13E9719334AD
2 changed files with 8 additions and 5 deletions

View file

@ -3,17 +3,17 @@
self,
}: let
inherit (inputs) nixpkgs;
inherit (builtins) concatLists attrValues mapAttrs elemAt match readDir filter listToAttrs;
inherit (nixpkgs.lib) hasSuffix nixosSystem genAttrs;
inherit (nixpkgs.lib.filesystem) listFilesRecursive;
lib = nixpkgs.lib.extend (import ./extended.nix);
inherit (builtins) concatLists attrValues mapAttrs elemAt match readDir filter listToAttrs;
inherit (lib) hasSuffix nixosSystem genAttrs isNixFile;
inherit (lib.filesystem) listFilesRecursive;
#supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
supportedSystems = ["x86_64-linux"];
in rec {
forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system});
isNixFile = path: hasSuffix ".nix" path;
buildOizys = _:
forAllSystems (
pkgs: let

View file

@ -1,6 +1,9 @@
final: prev: let
inherit (final) hasSuffix;
runes = import ../modules/runes;
in {
isNixFile = path: hasSuffix ".nix" path;
mkIfIn = name: list: prev.mkIf (builtins.elem name list);
mkRune = {
rune,