move nix2lua to the extended lib
This commit is contained in:
parent
d82800af41
commit
71303ad324
5 changed files with 10 additions and 8 deletions
|
@ -19,7 +19,7 @@ let
|
|||
|
||||
rawModule = evalModules {
|
||||
modules = [ config ] ++ allModules;
|
||||
specialArgs = { inherit pkgs lib nix2lua; };
|
||||
specialArgs = { inherit pkgs lib; };
|
||||
};
|
||||
|
||||
failedAssertions = map (x: x.message) (filter (x: !x.assertion) rawModule.config.assertions);
|
||||
|
|
|
@ -4,5 +4,7 @@ let
|
|||
types = import ./types.nix { inherit lib nix2lua; };
|
||||
in
|
||||
lib // {
|
||||
inherit nix2lua;
|
||||
|
||||
types = lib.types // types;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, nix2lua, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (builtins) filter attrValues;
|
||||
|
@ -31,7 +31,7 @@ in
|
|||
};
|
||||
|
||||
config.build.neovim = {
|
||||
luaConfig = with nix2lua; toLua (spaceBetween (lib.flatten [
|
||||
luaConfig = with lib.nix2lua; toLua (spaceBetween (lib.flatten [
|
||||
# Global Opts
|
||||
(lib.flip lib.mapAttrsToList config.vim.g (k: set "vim.g.${k}"))
|
||||
# Opts
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, pkgs, nix2lua, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
|
||||
let
|
||||
|
@ -56,7 +56,7 @@ let
|
|||
name = lib.mkDefault name;
|
||||
varName = lib.mkDefault (builtins.replaceStrings [ "-" "/" ] [ "_" "_" ] config.name);
|
||||
|
||||
genConfig = with nix2lua; lib.mkIf (!config.isDependency) (lib.flatten [
|
||||
genConfig = with lib.nix2lua; lib.mkIf (!config.isDependency) (lib.flatten [
|
||||
(local (set config.varName (require config.name)))
|
||||
config.beforeSetup
|
||||
(lib.optional (config.setupSettings != null)
|
||||
|
@ -66,7 +66,7 @@ let
|
|||
config.extra
|
||||
]);
|
||||
|
||||
luaConfig = with nix2lua; toLua (spaceBetween config.genConfig);
|
||||
luaConfig = with lib.nix2lua; toLua (spaceBetween config.genConfig);
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, nix2lua, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (builtins) match isFunction attrValues;
|
||||
|
@ -38,7 +38,7 @@ let
|
|||
|
||||
config = {
|
||||
name = lib.mkDefault name;
|
||||
loadExtension = with nix2lua; lib.mkDefault (pipe1
|
||||
loadExtension = with lib.nix2lua; lib.mkDefault (pipe1
|
||||
(var config.plugin.telescope-nvim.varName)
|
||||
(call "load_extension" sub.config.name)
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue