dev: relocate assertions to modules

This commit is contained in:
NotAShelf 2023-04-05 02:13:12 +03:00
commit ab4026d49e
No known key found for this signature in database
GPG key ID: F0D14CCB5ED5AA22

21
modules/assertions.nix Normal file
View file

@ -0,0 +1,21 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.vim;
in {
assertions = mkMerge [
{
assertion = cfg.kommentary.enable;
message = "Kommentary has been deprecated in favor of comments-nvim";
}
mkIf
(config.programs.neovim-flake.enable)
{
assertion = !config.programs.neovim.enable;
message = "You cannot use neovim-flake together with vanilla neovim.";
}
];
}