Add neovim package option to modules.

This commit is contained in:
Kevin Baensch 2024-11-28 22:46:13 +01:00
parent 2582586c64
commit 7e72334fec
Signed by: derped
GPG key ID: C0F1D326C7626543
3 changed files with 12 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{ lib, ... }:
{ lib, pkgs, ... }:
let
mkOption = lib.mkOption;
types = lib.types;
@ -207,6 +207,11 @@ in
default = false;
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 {
type = types.str;
default = "";

View file

@ -14,7 +14,9 @@ in
config = (lib.mkIf cfg.enable) {
_module.check = lib.mkDefault false;
home.packages = [
(wrapNeovimLazy pkgs.neovim-unwrapped { inherit (cfg) luaRcContent lazyConfig lazyPlugins; })
(wrapNeovimLazy cfg.package {
inherit (cfg) luaRcContent lazyConfig lazyPlugins;
})
];
};
}

View file

@ -14,7 +14,9 @@ in
config = (lib.mkIf cfg.enable) {
_module.check = lib.mkDefault false;
environment.systemPackages = [
(wrapNeovimLazy pkgs.neovim-unwrapped { inherit (cfg) luaRcContent lazyConfig lazyPlugins; })
(wrapNeovimLazy cfg.package {
inherit (cfg) luaRcContent lazyConfig lazyPlugins;
})
];
};
}