mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 17:03:31 +02:00
Don't override home-manager's defaults
This commit is contained in:
parent
c490e4c59c
commit
d9b2c8c9be
1 changed files with 6 additions and 4 deletions
10
nixvim.nix
10
nixvim.nix
|
@ -80,8 +80,8 @@ in
|
||||||
enable = mkEnableOption "enable NixVim";
|
enable = mkEnableOption "enable NixVim";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.nullOr types.package;
|
||||||
default = pkgs.neovim;
|
default = null;
|
||||||
description = "The package to use for neovim.";
|
description = "The package to use for neovim.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -187,7 +187,9 @@ in
|
||||||
extraWrapperArgs = optionalString (cfg.extraPackages != [])
|
extraWrapperArgs = optionalString (cfg.extraPackages != [])
|
||||||
''--prefix PATH : "${makeBinPath cfg.extraPackages}"'';
|
''--prefix PATH : "${makeBinPath cfg.extraPackages}"'';
|
||||||
|
|
||||||
wrappedNeovim = pkgs.wrapNeovimUnstable cfg.package (neovimConfig // {
|
package = if (cfg.package != null) then cfg.package else pkgs.neovim;
|
||||||
|
|
||||||
|
wrappedNeovim = pkgs.wrapNeovimUnstable package (neovimConfig // {
|
||||||
wrapperArgs = lib.escapeShellArgs neovimConfig.wrapperArgs + " "
|
wrapperArgs = lib.escapeShellArgs neovimConfig.wrapperArgs + " "
|
||||||
+ extraWrapperArgs;
|
+ extraWrapperArgs;
|
||||||
});
|
});
|
||||||
|
@ -281,7 +283,7 @@ in
|
||||||
programs.nixvim.extraConfigLua = extraConfigLua;
|
programs.nixvim.extraConfigLua = extraConfigLua;
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = cfg.package;
|
package = mkIf (cfg.package != null) cfg.package;
|
||||||
extraPackages = cfg.extraPackages;
|
extraPackages = cfg.extraPackages;
|
||||||
configure = configure;
|
configure = configure;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue