nix-community.nixvim/wrappers/darwin.nix
2023-03-09 14:03:50 +01:00

34 lines
708 B
Nix

modules: {
pkgs,
config,
lib,
...
} @ args: let
inherit (lib) mkEnableOption mkOption mkOptionType mkForce mkMerge mkIf types;
shared = import ./_shared.nix args;
cfg = config.programs.nixvim;
in {
options = {
programs.nixvim = mkOption {
default = {};
type = types.submodule ((modules pkgs)
++ [
{
options.enable = mkEnableOption "nixvim";
config.wrapRc = mkForce true;
}
]);
};
nixvim.helpers = shared.helpers;
};
config = mkIf cfg.enable mkMerge [
{
environment.systemPackages = [cfg.finalPackage];
}
{
warnings = cfg.warnings;
assertions = cfg.assertions;
}
];
}