From f823ebd2badce6dc617dec6bb1ee22464978f8c7 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Mon, 6 May 2024 16:47:45 +0300 Subject: [PATCH] add modules path and special args --- default.nix | 4 +++- flake.nix | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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