1 { config, lib, pkgs, ... }:
4 cfg = config.programs.yazi;
6 settingsFormat = pkgs.formats.toml { };
8 files = [ "yazi" "theme" "keymap" ];
11 options.programs.yazi = {
12 enable = lib.mkEnableOption "yazi terminal file manager";
14 package = lib.mkPackageOption pkgs "yazi" { };
16 settings = lib.mkOption {
17 type = with lib.types; submodule {
18 options = (lib.listToAttrs (map
19 (name: lib.nameValuePair name (lib.mkOption {
20 inherit (settingsFormat) type;
23 Configuration included in `${name}.toml`.
25 See https://yazi-rs.github.io/docs/configuration/${name}/ for documentation.
32 Configuration included in `$YAZI_CONFIG_HOME`.
36 initLua = lib.mkOption {
37 type = with lib.types; nullOr path;
40 The init.lua for Yazi itself.
42 example = lib.literalExpression "./init.lua";
45 plugins = lib.mkOption {
46 type = with lib.types; attrsOf (oneOf [ path package ]);
51 See https://yazi-rs.github.io/docs/plugins/overview/ for documentation.
53 example = lib.literalExpression ''
61 flavors = lib.mkOption {
62 type = with lib.types; attrsOf (oneOf [ path package ]);
67 See https://yazi-rs.github.io/docs/flavors/overview/ for documentation.
69 example = lib.literalExpression ''
79 config = lib.mkIf cfg.enable {
80 environment.systemPackages = [
81 (cfg.package.override {
82 inherit (cfg) settings initLua plugins flavors;
88 maintainers = with lib.maintainers; [ linsui ];