diff --git a/default.nix b/default.nix index afd99ed..f5c9c5d 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,7 @@ { config ? { } , pkgs ? import { } , nix2lua ? import +, specialArgs ? { } }: @@ -16,10 +17,11 @@ let }; allModules = import ./module-list.nix { inherit pkgs; }; + modulesPath = ./modules; rawModule = evalModules { modules = [ config ] ++ allModules; - specialArgs = { inherit pkgs lib; }; + specialArgs = { inherit pkgs lib modulesPath; } // specialArgs; }; failedAssertions = map (x: x.message) (filter (x: !x.assertion) rawModule.config.assertions); diff --git a/flake.nix b/flake.nix index 2315076..f708bc3 100644 --- a/flake.nix +++ b/flake.nix @@ -16,9 +16,9 @@ inherit (builtins) listToAttrs readDir attrNames; inherit (nixpkgs) lib; - mkNixeovim = { system, config }: + mkNixeovim = { system, config, specialArgs ? { } }: let pkgs = import nixpkgs { inherit system; }; in - import ./. { inherit config pkgs nix2lua; }; + import ./. { inherit config pkgs nix2lua specialArgs; }; mkNixeovimPackage = args: (mkNixeovim args).build.neovim.toplevel; profiles = listToAttrs