From 87fe0471adb36b82c7c2a3e60ad937a63e648834 Mon Sep 17 00:00:00 2001 From: muon Date: Sun, 2 Feb 2025 13:20:24 +0000 Subject: [PATCH] Add yazi config --- modules/home/terminal/default.nix | 8 ++----- modules/home/terminal/tools.nix | 1 - modules/home/terminal/yazi.nix | 39 +++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 modules/home/terminal/yazi.nix diff --git a/modules/home/terminal/default.nix b/modules/home/terminal/default.nix index d87e57d..82727d0 100644 --- a/modules/home/terminal/default.nix +++ b/modules/home/terminal/default.nix @@ -1,10 +1,6 @@ { pkgs, lib, osConfig, ... }: { - imports = [ - ./shell.nix - ./emulator.nix - ./development.nix - ./tools.nix - ]; + imports = + [ ./shell.nix ./emulator.nix ./development.nix ./tools.nix ./yazi.nix ]; config = lib.mkIf osConfig.mods.desktop.enable { mods.terminal.emulator.enable = lib.mkDefault true; diff --git a/modules/home/terminal/tools.nix b/modules/home/terminal/tools.nix index 2f21239..f2f4311 100644 --- a/modules/home/terminal/tools.nix +++ b/modules/home/terminal/tools.nix @@ -20,7 +20,6 @@ in with lib; { "bat" "zoxide" "dircolors" - "yazi" "nix-index" "thefuck" diff --git a/modules/home/terminal/yazi.nix b/modules/home/terminal/yazi.nix new file mode 100644 index 0000000..160b944 --- /dev/null +++ b/modules/home/terminal/yazi.nix @@ -0,0 +1,39 @@ +{ pkgs, lib, config, ... }: +let cfg = config.mods.terminal; +in with lib; { + + config = mkIf cfg.tools.enable { + programs.yazi = { + enable = true; + settings = { + manager = { + ratio = [ 1 4 3 ]; + sort_by = "natural"; + sort_sensitive = true; + sort_reverse = false; + sort_dir_first = true; + linemode = "none"; + show_hidden = true; + show_symlink = true; + }; + + preview = { + image_filter = "lanczos3"; + image_quality = 90; + tab_size = 1; + max_width = 600; + max_height = 900; + cache_dir = ""; + ueberzug_scale = 1; + ueberzug_offset = [ 0 0 0 0 ]; + }; + + tasks = { + micro_workers = 5; + macro_workers = 10; + bizarre_retry = 5; + }; + }; + }; + }; +}