add modules path and special args
This commit is contained in:
parent
b96868c030
commit
f823ebd2ba
2 changed files with 5 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
||||||
{ config ? { }
|
{ config ? { }
|
||||||
, pkgs ? import <nixpkgs> { }
|
, pkgs ? import <nixpkgs> { }
|
||||||
, nix2lua ? import <nix2lua>
|
, nix2lua ? import <nix2lua>
|
||||||
|
, specialArgs ? { }
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,10 +17,11 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
allModules = import ./module-list.nix { inherit pkgs; };
|
allModules = import ./module-list.nix { inherit pkgs; };
|
||||||
|
modulesPath = ./modules;
|
||||||
|
|
||||||
rawModule = evalModules {
|
rawModule = evalModules {
|
||||||
modules = [ config ] ++ allModules;
|
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);
|
failedAssertions = map (x: x.message) (filter (x: !x.assertion) rawModule.config.assertions);
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
inherit (builtins) listToAttrs readDir attrNames;
|
inherit (builtins) listToAttrs readDir attrNames;
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
|
|
||||||
mkNixeovim = { system, config }:
|
mkNixeovim = { system, config, specialArgs ? { } }:
|
||||||
let pkgs = import nixpkgs { inherit system; }; in
|
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;
|
mkNixeovimPackage = args: (mkNixeovim args).build.neovim.toplevel;
|
||||||
|
|
||||||
profiles = listToAttrs
|
profiles = listToAttrs
|
||||||
|
|
Loading…
Reference in a new issue