2022-12-30 21:12:07 +01:00
|
|
|
modules:
|
2023-01-24 01:28:01 +00:00
|
|
|
{ pkgs, config, lib, ... }@args:
|
2022-12-30 21:12:07 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib) mkEnableOption mkOption mkOptionType mkForce mkMerge mkIf types;
|
2023-01-24 01:28:01 +00:00
|
|
|
shared = import ./_shared.nix args;
|
2022-12-30 21:12:07 +01:00
|
|
|
cfg = config.programs.nixvim;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
programs.nixvim = mkOption {
|
|
|
|
type = types.submodule ((modules pkgs) ++ [{
|
|
|
|
options.enable = mkEnableOption "nixvim";
|
2023-01-24 01:28:01 +00:00
|
|
|
config.wrapRc = mkForce true;
|
2022-12-30 21:12:07 +01:00
|
|
|
}]);
|
|
|
|
};
|
2023-01-24 01:28:01 +00:00
|
|
|
nixvim.helpers = shared.helpers;
|
2022-12-30 21:12:07 +01:00
|
|
|
};
|
|
|
|
|
2023-01-24 01:28:01 +00:00
|
|
|
config = mkIf cfg.enable mkMerge [
|
|
|
|
{
|
|
|
|
environment.systemPackages = [ cfg.finalPackage ];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
warnings = cfg.warnings;
|
|
|
|
assertions = cfg.assertions;
|
|
|
|
}
|
|
|
|
];
|
2022-12-30 21:12:07 +01:00
|
|
|
}
|