mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +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";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.neovim;
|
||||
type = types.nullOr types.package;
|
||||
default = null;
|
||||
description = "The package to use for neovim.";
|
||||
};
|
||||
|
||||
|
@ -186,8 +186,10 @@ in
|
|||
|
||||
extraWrapperArgs = optionalString (cfg.extraPackages != [])
|
||||
''--prefix PATH : "${makeBinPath cfg.extraPackages}"'';
|
||||
|
||||
package = if (cfg.package != null) then cfg.package else pkgs.neovim;
|
||||
|
||||
wrappedNeovim = pkgs.wrapNeovimUnstable cfg.package (neovimConfig // {
|
||||
wrappedNeovim = pkgs.wrapNeovimUnstable package (neovimConfig // {
|
||||
wrapperArgs = lib.escapeShellArgs neovimConfig.wrapperArgs + " "
|
||||
+ extraWrapperArgs;
|
||||
});
|
||||
|
@ -281,7 +283,7 @@ in
|
|||
programs.nixvim.extraConfigLua = extraConfigLua;
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
package = cfg.package;
|
||||
package = mkIf (cfg.package != null) cfg.package;
|
||||
extraPackages = cfg.extraPackages;
|
||||
configure = configure;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue