{ lib, inputs, config, ... }: { imports = [ inputs.flake-file.flakeModules.default inputs.flake-file.flakeModules.import-tree ]; options = { nixpkgs = lib.mkOption { type = lib.types.submodule { options = { overlays = lib.mkOption { type = lib.types.listOf (lib.types.functionTo (lib.types.functionTo (lib.types.lazyAttrsOf lib.types.unspecified))); default = []; }; unfreePredicates = lib.mkOption { type = lib.types.listOf lib.types.str; default = []; }; extras = lib.mkOption { type = lib.types.attrsOf lib.types.unspecified; default = {}; }; }; }; }; }; config = { flake-file = { outputs = "inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules)"; inputs = { flake-file.url = "github:denful/flake-file"; flake-parts = { url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs-lib"; }; nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"; nixpkgs-lib.url = "github:nix-community/nixpkgs.lib"; }; }; perSystem = { system, lib, ... }: { _module.args.pkgs = import inputs.nixpkgs { inherit system; config = { overlays = config.nixpkgs.overlays; allowUnfree = true; allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.nixpkgs.unfreePredicates; } // config.nixpkgs.extras; }; }; systems = [ "x86_64-linux" "aarch64-linux" ]; }; }