add modules path and special args

This commit is contained in:
Dmitriy Pleshevskiy 2024-05-06 16:47:45 +03:00
parent b96868c030
commit f823ebd2ba
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2
2 changed files with 5 additions and 3 deletions

View file

@ -1,6 +1,7 @@
{ config ? { }
, pkgs ? import <nixpkgs> { }
, nix2lua ? import <nix2lua>
, 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);

View file

@ -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