Commit 9ed7ad7

HPCesia <me@hpcesia.com>
2025-10-01 16:12:49
refactor: migrate yazi
1 parent 8d3e87d
Changed files (3)
home
base
tui
modules
dev
yazi
plugins
auto-layout.yazi
home/base/tui/yazi/default.nix
@@ -1,36 +0,0 @@
-{pkgs, ...}: {
-  programs.yazi = {
-    enable = true;
-    enableBashIntegration = true;
-    enableFishIntegration = true;
-    enableNushellIntegration = true;
-    plugins = {
-      git = pkgs.yaziPlugins.git;
-      # starship = pkgs.yaziPlugins.starship;
-      auto-layout = ./plugins/auto-layout.yazi;
-    };
-    initLua = ''
-      require("git"):setup()
-      -- require("starship"):setup()
-      require("auto-layout").setup()
-    '';
-    settings = {
-      mgr = {
-        show_hidden = true;
-        sort_dir_first = true;
-      };
-      plugin.prepend_fetchers = [
-        {
-          id = "git";
-          name = "*";
-          run = "git";
-        }
-        {
-          id = "git";
-          name = "*/";
-          run = "git";
-        }
-      ];
-    };
-  };
-}
home/base/tui/yazi/plugins/auto-layout.yazi/main.lua → modules/dev/yazi/plugins/auto-layout.yazi/main.lua
File renamed without changes
modules/dev/yazi/default.nix
@@ -0,0 +1,37 @@
+{
+  flake.modules.homeManager.dev = {pkgs, ...}: {
+    programs.yazi = {
+      enable = true;
+      enableBashIntegration = true;
+      enableFishIntegration = true;
+      enableNushellIntegration = true;
+      plugins = {
+        git = pkgs.yaziPlugins.git;
+        # starship = pkgs.yaziPlugins.starship;
+        auto-layout = ./plugins/auto-layout.yazi;
+      };
+      initLua = ''
+        require("git"):setup()
+        require("auto-layout").setup()
+      '';
+      settings = {
+        mgr = {
+          show_hidden = true;
+          sort_dir_first = true;
+        };
+        plugin.prepend_fetchers = [
+          {
+            id = "git";
+            name = "*";
+            run = "git";
+          }
+          {
+            id = "git";
+            name = "*/";
+            run = "git";
+          }
+        ];
+      };
+    };
+  };
+}