mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 21:30:51 +00:00
feat: assert failing conditions
This commit is contained in:
parent
f1f4b80c59
commit
bd61b1375a
2 changed files with 19 additions and 12 deletions
|
@ -6,16 +6,22 @@
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.vim;
|
cfg = config.vim;
|
||||||
in {
|
in {
|
||||||
assertions = mkMerge [
|
config = {
|
||||||
{
|
assertions = mkMerge [
|
||||||
assertion = cfg.kommentary.enable;
|
{
|
||||||
message = "Kommentary has been deprecated in favor of comments-nvim";
|
assertion = cfg.kommentary.enable;
|
||||||
}
|
message = "Kommentary has been deprecated in favor of comments-nvim";
|
||||||
mkIf
|
}
|
||||||
(config.programs.neovim-flake.enable)
|
{
|
||||||
{
|
assertion = cfg.utility.colorizer.enable;
|
||||||
assertion = !config.programs.neovim.enable;
|
message = "config.utility.colorizer has been renamed to config.utility.ccc";
|
||||||
message = "You cannot use `programs.neovim-flake.enable` with `programs.neovim.enable`";
|
}
|
||||||
}
|
mkIf
|
||||||
];
|
(config.programs.neovim-flake.enable)
|
||||||
|
{
|
||||||
|
assertion = !config.programs.neovim.enable;
|
||||||
|
message = "You cannot use `programs.neovim-flake.enable` with `programs.neovim.enable`";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,7 @@ inputs: {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
imports = [./assertions.nix];
|
||||||
inherit (module) options config;
|
inherit (module) options config;
|
||||||
inherit (module._module.args) pkgs;
|
inherit (module._module.args) pkgs;
|
||||||
inherit neovim;
|
inherit neovim;
|
||||||
|
|
Loading…
Reference in a new issue