lazy.nvim.nix/modules/nvim-lazy/nixosModule.nix
2024-05-05 16:20:05 +02:00

31 lines
707 B
Nix

{
lib,
config,
pkgs,
...
}:
let
cfg = config.programs.nvim-lazy;
# TODO: There must be a better way to implement this...
luaUtils = import ../../pkgs/luaUtils.nix { inherit lib pkgs; };
lazyUtils = import ../../pkgs/lazyUtils.nix { inherit lib luaUtils pkgs; };
wrapNeovimLazy =
(import ../../default.nix {
inherit
lib
pkgs
luaUtils
lazyUtils
;
}).packages.wrapNeovimLazy;
in
{
imports = [ ./default.nix ];
config = (lib.mkIf cfg.enable) {
_module.check = lib.mkDefault false;
environment.systemPackages = [
(wrapNeovimLazy pkgs.neovim-unwrapped { inherit (cfg) luaRcContent lazyConfig lazyPlugins; })
];
};
}