Add neovim package option to modules.
This commit is contained in:
parent
2582586c64
commit
7e72334fec
3 changed files with 12 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ lib, ... }:
|
{ lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
mkOption = lib.mkOption;
|
mkOption = lib.mkOption;
|
||||||
types = lib.types;
|
types = lib.types;
|
||||||
|
@ -207,6 +207,11 @@ in
|
||||||
default = false;
|
default = false;
|
||||||
description = ''If set to true nvim will be installed with the plugins defined in programs.nvim-lazy.plugins.'';
|
description = ''If set to true nvim will be installed with the plugins defined in programs.nvim-lazy.plugins.'';
|
||||||
};
|
};
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.neovim-unwrapped;
|
||||||
|
description = ''The neovim-unwrapped package to use.'';
|
||||||
|
};
|
||||||
luaRcContent = mkOption {
|
luaRcContent = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "";
|
default = "";
|
||||||
|
|
|
@ -14,7 +14,9 @@ in
|
||||||
config = (lib.mkIf cfg.enable) {
|
config = (lib.mkIf cfg.enable) {
|
||||||
_module.check = lib.mkDefault false;
|
_module.check = lib.mkDefault false;
|
||||||
home.packages = [
|
home.packages = [
|
||||||
(wrapNeovimLazy pkgs.neovim-unwrapped { inherit (cfg) luaRcContent lazyConfig lazyPlugins; })
|
(wrapNeovimLazy cfg.package {
|
||||||
|
inherit (cfg) luaRcContent lazyConfig lazyPlugins;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,9 @@ in
|
||||||
config = (lib.mkIf cfg.enable) {
|
config = (lib.mkIf cfg.enable) {
|
||||||
_module.check = lib.mkDefault false;
|
_module.check = lib.mkDefault false;
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(wrapNeovimLazy pkgs.neovim-unwrapped { inherit (cfg) luaRcContent lazyConfig lazyPlugins; })
|
(wrapNeovimLazy cfg.package {
|
||||||
|
inherit (cfg) luaRcContent lazyConfig lazyPlugins;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue