mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
misc: refactor helpers propagation
Co-authored-by: Robert Hensing <robert@roberthensing.nl>
This commit is contained in:
parent
3bbb3d5453
commit
5d3ed3a09e
12 changed files with 100 additions and 40 deletions
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
modules,
|
||||
self,
|
||||
getHelpers,
|
||||
}: {
|
||||
pkgs,
|
||||
config,
|
||||
|
@ -8,7 +9,8 @@
|
|||
...
|
||||
} @ args: let
|
||||
inherit (lib) mkEnableOption mkOption mkOptionType mkForce mkMerge mkIf types;
|
||||
shared = import ./_shared.nix modules args;
|
||||
helpers = getHelpers pkgs;
|
||||
shared = import ./_shared.nix {inherit modules helpers;} args;
|
||||
cfg = config.programs.nixvim;
|
||||
files =
|
||||
shared.configFiles
|
||||
|
@ -19,16 +21,21 @@ in {
|
|||
options = {
|
||||
programs.nixvim = mkOption {
|
||||
default = {};
|
||||
type = types.submodule ([
|
||||
{
|
||||
options = {
|
||||
enable = mkEnableOption "nixvim";
|
||||
defaultEditor = mkEnableOption "nixvim as the default editor";
|
||||
};
|
||||
config.wrapRc = mkForce true;
|
||||
}
|
||||
]
|
||||
++ shared.topLevelModules);
|
||||
type = types.submoduleWith {
|
||||
shorthandOnlyDefinesConfig = true;
|
||||
specialArgs.helpers = helpers;
|
||||
modules =
|
||||
[
|
||||
{
|
||||
options = {
|
||||
enable = mkEnableOption "nixvim";
|
||||
defaultEditor = mkEnableOption "nixvim as the default editor";
|
||||
};
|
||||
config.wrapRc = mkForce true;
|
||||
}
|
||||
]
|
||||
++ shared.topLevelModules;
|
||||
};
|
||||
};
|
||||
nixvim.helpers = shared.helpers;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue