mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
lib/modules: init with specialArgs
helpers
This commit is contained in:
parent
491ca5cf51
commit
27c4c9c210
9 changed files with 35 additions and 49 deletions
|
@ -23,12 +23,7 @@ in
|
|||
default = { };
|
||||
type = types.submoduleWith {
|
||||
shorthandOnlyDefinesConfig = true;
|
||||
specialArgs = {
|
||||
darwinConfig = config;
|
||||
defaultPkgs = pkgs;
|
||||
helpers = config.lib.nixvim;
|
||||
lib = config.lib.nixvim.extendedLib;
|
||||
};
|
||||
specialArgs = config.lib.nixvim.modules.specialArgsWith { darwinConfig = config; };
|
||||
modules = [
|
||||
./modules/darwin.nix
|
||||
../modules/top-level
|
||||
|
|
|
@ -22,12 +22,7 @@ in
|
|||
default = { };
|
||||
type = types.submoduleWith {
|
||||
shorthandOnlyDefinesConfig = true;
|
||||
specialArgs = {
|
||||
hmConfig = config;
|
||||
defaultPkgs = pkgs;
|
||||
helpers = config.lib.nixvim;
|
||||
lib = config.lib.nixvim.extendedLib;
|
||||
};
|
||||
specialArgs = config.lib.nixvim.modules.specialArgsWith { hmConfig = config; };
|
||||
modules = [
|
||||
./modules/hm.nix
|
||||
../modules/top-level
|
||||
|
|
|
@ -23,12 +23,7 @@ in
|
|||
default = { };
|
||||
type = types.submoduleWith {
|
||||
shorthandOnlyDefinesConfig = true;
|
||||
specialArgs = {
|
||||
nixosConfig = config;
|
||||
defaultPkgs = pkgs;
|
||||
helpers = config.lib.nixvim;
|
||||
lib = config.lib.nixvim.extendedLib;
|
||||
};
|
||||
specialArgs = config.lib.nixvim.modules.specialArgsWith { nixosConfig = config; };
|
||||
modules = [
|
||||
./modules/nixos.nix
|
||||
../modules/top-level
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
default_pkgs: self:
|
||||
{
|
||||
pkgs ? default_pkgs,
|
||||
lib ? pkgs.lib,
|
||||
extraSpecialArgs ? { },
|
||||
_nixvimTests ? false,
|
||||
module,
|
||||
}:
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
|
||||
helpers = import ../lib/helpers.nix { inherit pkgs lib _nixvimTests; };
|
||||
|
||||
inherit (helpers.modules) specialArgsWith;
|
||||
|
||||
handleAssertions =
|
||||
config:
|
||||
let
|
||||
|
@ -29,11 +30,7 @@ let
|
|||
./modules/standalone.nix
|
||||
../modules/top-level
|
||||
];
|
||||
specialArgs = {
|
||||
inherit helpers;
|
||||
lib = helpers.extendedLib;
|
||||
defaultPkgs = pkgs;
|
||||
} // extraSpecialArgs;
|
||||
specialArgs = specialArgsWith extraSpecialArgs;
|
||||
};
|
||||
config = handleAssertions evaledModule.config;
|
||||
in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue