mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
34 lines
708 B
Nix
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;
|
|
}
|
|
];
|
|
}
|