aboutsummaryrefslogtreecommitdiffstats
path: root/modules/file-management/yazi/assertions.nix
blob: 6435b007e5884eb6f3a90f82473ab69fea024ed7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Validates yazi dependencies and sub-options
{ config, ... }:
let
  cfg = config.file-management.yazi;
in
{
  assertions = [
    {
      assertion = !cfg.enable || config.terminal.kitty.enable;
      message = ''
        file-management.yazi is enabled but terminal.kitty.enable is not.
        yazi's desktop entry requires kitty as the terminal launcher. Please enable terminal.kitty.
      '';
    }
    {
      assertion = !cfg.file-chooser.enable || cfg.enable;
      message = "file-management.yazi.file-chooser.enable requires file-management.yazi.enable.";
    }
  ];
}