nix-community.nixvim/wrappers/nixos.nix
Alexander Nortung 63c256dc3d
core: show warnings for deprecated or changed options (#129)
* moved helpers to lib folder

* Created proxy file for helpers.nix

* wrappers: removed code duplication

* null-ls: fix wrong name of variable

* added warnings module

* Added assertions

* bufferline: deprecated option

* nvim-tree: renamed options

* Fixed mkRenamedOption

* Bufferline: added new options

* Fixed deprecated option

Co-authored-by: Pedro Alves <pta2002@pta2002.com>
2023-01-24 01:28:01 +00:00

31 lines
760 B
Nix

modules:
{ pkgs, config, lib, ... }@args:
let
inherit (lib) mkEnableOption mkOption mkOptionType mkMerge mkIf types;
shared = import ./_shared.nix args;
cfg = config.programs.nixvim;
in
{
options = {
programs.nixvim = mkOption {
type = types.submodule ((modules pkgs) ++ [{
options.enable = mkEnableOption "nixvim";
}]);
};
nixvim.helpers = shared.helpers;
};
config = mkIf cfg.enable
(mkMerge [
{ environment.systemPackages = [ cfg.finalPackage ]; }
(mkIf (!cfg.wrapRc) {
environment.etc."nvim/sysinit.lua".text = cfg.initContent;
environment.variables."VIM" = "/etc/nvim";
})
({
warnings = cfg.warnings;
assertions = cfg.assertions;
})
]);
}