From cd3e60e3cce3e678c2355ff72f9fa26de9dde34d Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Wed, 5 Nov 2025 00:27:52 +0100 Subject: [PATCH 1/5] chore: add comment --- modules/linux/home-manager/shell-additions.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/linux/home-manager/shell-additions.nix b/modules/linux/home-manager/shell-additions.nix index 9b6bdba..98b94e8 100644 --- a/modules/linux/home-manager/shell-additions.nix +++ b/modules/linux/home-manager/shell-additions.nix @@ -26,6 +26,7 @@ croc ]; + # Setup rclone programs.rclone = { enable = true; remotes = { From b9413da4b99ef5ae843fe3226e8445b94b355ab2 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Wed, 5 Nov 2025 18:10:11 +0100 Subject: [PATCH 2/5] feat(shell): setup yazi file manager. --- modules/cross-platform/home-manager/shell.nix | 46 +++++++++++++++++++ .../home-manager/yazi/folder-rules/main.lua | 12 +++++ .../home-manager/yazi/smart-tab/main.lua | 7 +++ 3 files changed, 65 insertions(+) create mode 100644 modules/cross-platform/home-manager/yazi/folder-rules/main.lua create mode 100644 modules/cross-platform/home-manager/yazi/smart-tab/main.lua diff --git a/modules/cross-platform/home-manager/shell.nix b/modules/cross-platform/home-manager/shell.nix index ab052eb..8d2649c 100644 --- a/modules/cross-platform/home-manager/shell.nix +++ b/modules/cross-platform/home-manager/shell.nix @@ -141,5 +141,51 @@ filter_mode = "directory"; }; }; + + # Install and setup yazi + programs.yazi = { + enable = true; + enableZshIntegration = true; + shellWrapperName = "y"; + settings = { + mgr = { + ratio = [0 4 4]; + sort_by = "natural"; + show_hidden = true; + show_symlink = false; + }; + }; + plugins = { + full-border = pkgs.yaziPlugins.full-border; + smart-enter = pkgs.yaziPlugins.smart-enter; + smart-tab = ./yazi/smart-tab; + folder-rules = ./yazi/folder-rules; + }; + initLua = '' + require("full-border"):setup({ + type = ui.Border.ROUNDED, + }) + + require("smart-enter"):setup({ + open_multi = true, + }) + + require("folder-rules"):setup() + ''; + keymap = { + mgr.prepend_keymap = [ + { + on = "l"; + run = "plugin smart-enter"; + desc = "Enter the child directory, or open the file"; + } + { + on = "t"; + run = "plugin smart-tab"; + desc = "Create a tab and enter the howered directory"; + } + ]; + }; + }; }; } diff --git a/modules/cross-platform/home-manager/yazi/folder-rules/main.lua b/modules/cross-platform/home-manager/yazi/folder-rules/main.lua new file mode 100644 index 0000000..ad2db62 --- /dev/null +++ b/modules/cross-platform/home-manager/yazi/folder-rules/main.lua @@ -0,0 +1,12 @@ +local function setup() + ps.sub("cd", function() + local cwd = cx.active.current.cwd + if cwd:ends_with("downs") then + ya.emit("sort", { "mtime", reverse = true, dir_first = false }) + else + ya.emit("sort", { "natural", reverse = false, dir_first = true }) + end + end) +end + +return { setup = setup } diff --git a/modules/cross-platform/home-manager/yazi/smart-tab/main.lua b/modules/cross-platform/home-manager/yazi/smart-tab/main.lua new file mode 100644 index 0000000..e5270d3 --- /dev/null +++ b/modules/cross-platform/home-manager/yazi/smart-tab/main.lua @@ -0,0 +1,7 @@ +--- @sync entry +return { + entry = function() + local h = cx.active.current.hovered + ya.emit("tab_create", h and h.cha.is_dir and { h.url } or { current = true }) + end, +} From f68e97e7624cdd83b1ad127b5b32a3361d338f58 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Wed, 5 Nov 2025 18:09:33 +0100 Subject: [PATCH 3/5] feat(skadi): enable scx with scx_lavd performance --- hosts/skadi/configuration.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hosts/skadi/configuration.nix b/hosts/skadi/configuration.nix index cfd7147..bf23fb2 100644 --- a/hosts/skadi/configuration.nix +++ b/hosts/skadi/configuration.nix @@ -23,12 +23,11 @@ # Use the xanmod kernel boot.kernelPackages = pkgs.linuxPackages_cachyos-lto; - # services.scx = { - # enable = true; - # package = pkgs.scx_git.full; - # scheduler = "scx_lavd"; - # extraArgs = ["--autopilot"]; - # }; + services.scx = { + enable = true; + scheduler = "scx_lavd"; + extraArgs = ["--performance" "--no-core-compaction"]; + }; # Get nicer hostname networking.hostName = "skadi"; # Define your hostname. From 049fa5881f01bd635e7e0c1a57fcf28288b4c3ef Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Wed, 5 Nov 2025 18:11:09 +0100 Subject: [PATCH 4/5] feat(yazi): add simple folder rules. --- .../cross-platform/home-manager/yazi/folder-rules/main.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/cross-platform/home-manager/yazi/folder-rules/main.lua b/modules/cross-platform/home-manager/yazi/folder-rules/main.lua index ad2db62..10daefc 100644 --- a/modules/cross-platform/home-manager/yazi/folder-rules/main.lua +++ b/modules/cross-platform/home-manager/yazi/folder-rules/main.lua @@ -3,6 +3,10 @@ local function setup() local cwd = cx.active.current.cwd if cwd:ends_with("downs") then ya.emit("sort", { "mtime", reverse = true, dir_first = false }) + elseif cwd:ends_with("screenshots") then + ya.emit("sort", { "mtime", reverse = true, dir_first = false }) + elseif cwd:ends_with("vids") then + ya.emit("sort", { "mtime", reverse = true, dir_first = false }) else ya.emit("sort", { "natural", reverse = false, dir_first = true }) end From 71095292e9e07f4b7676db9e9737526d66ed671f Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Wed, 5 Nov 2025 18:11:33 +0100 Subject: [PATCH 5/5] chore: update flake.lock --- flake.lock | 126 ++++++++++++++++++++++++++--------------------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/flake.lock b/flake.lock index a02906e..7b1efe9 100644 --- a/flake.lock +++ b/flake.lock @@ -9,11 +9,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1762136250, - "narHash": "sha256-uyt4A8SAkX/H1sMQPypwPWwoJOaOgtMlnW8Kzn6uxkk=", + "lastModified": 1762188647, + "narHash": "sha256-OAXK4p7WIYUcp8xx9m0RZUpV6XUDEhkoM4efI8dzPiU=", "owner": "ezKEa", "repo": "aagl-gtk-on-nix", - "rev": "d896d6fd9ce4ff1a5c490a1eacd98bdaba047c28", + "rev": "1172be1377bc65581004f4d5927b58c5c7d96639", "type": "github" }, "original": { @@ -63,11 +63,11 @@ ] }, "locked": { - "lastModified": 1760101617, - "narHash": "sha256-8jf/3ZCi+B7zYpIyV04+3wm72BD7Z801IlOzsOACR7I=", + "lastModified": 1761420899, + "narHash": "sha256-kxGCip6GNbcbNWKu4J2iKbNYfFTS8Zbjg9CWp0zmFoM=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "1826a9923881320306231b1c2090379ebf9fa4f8", + "rev": "62479232aae42c1ef09c2c027c8cfd91df060897", "type": "github" }, "original": { @@ -171,11 +171,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1762142233, - "narHash": "sha256-iaCwRAWud6hcy6piBAiU9t8swmyAGVmucHnTjcPe6IM=", + "lastModified": 1762205917, + "narHash": "sha256-8vFEZ4oHYOAzC9/zN3Eb/zxbfPPBGAqsQNRKG1WiqZY=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "3a26d7cf3b5d8083fc7c406e8aed4251e364c48f", + "rev": "16950d0a7a54c242201aee3ba6b7164cee6fbd88", "type": "github" }, "original": { @@ -229,11 +229,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1756719547, - "narHash": "sha256-N9gBKUmjwRKPxAafXEk1EGadfk2qDZPBQp4vXWPHINQ=", + "lastModified": 1762286984, + "narHash": "sha256-9I2H9x5We6Pl+DBYHjR1s3UT8wgwcpAH03kn9CqtdQc=", "owner": "serokell", "repo": "deploy-rs", - "rev": "125ae9e3ecf62fb2c0fd4f2d894eb971f1ecaed2", + "rev": "9c870f63e28ec1e83305f7f6cb73c941e699f74f", "type": "github" }, "original": { @@ -249,11 +249,11 @@ ] }, "locked": { - "lastModified": 1761899396, - "narHash": "sha256-XOpKBp6HLzzMCbzW50TEuXN35zN5WGQREC7n34DcNMM=", + "lastModified": 1762276996, + "narHash": "sha256-TtcPgPmp2f0FAnc+DMEw4ardEgv1SGNR3/WFGH0N19M=", "owner": "nix-community", "repo": "disko", - "rev": "6f4cf5abbe318e4cd1e879506f6eeafd83f7b998", + "rev": "af087d076d3860760b3323f6b583f4d828c1ac17", "type": "github" }, "original": { @@ -268,11 +268,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1762159045, - "narHash": "sha256-1ScdI8RNYhELBVRwzd4H8D+NDn4FC6mBM15CSCNGvAY=", + "lastModified": 1762308713, + "narHash": "sha256-EaX+Yu/nsPDe+1rv2RSPP/zc5Jotc0HD3XzQVA7LxnI=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "9b3bdd59254957e2583a23cf8659d228151b7d36", + "rev": "80b800345a4bbe611aafb9f722b2928a12b93222", "type": "github" }, "original": { @@ -913,11 +913,11 @@ ] }, "locked": { - "lastModified": 1761878381, - "narHash": "sha256-lCRaipHgszaFZ1Cs8fdGJguVycCisBAf2HEFgip5+xU=", + "lastModified": 1762146130, + "narHash": "sha256-/XOEA0a61fZ45i/BpaSsyLNNbw/yKwjMbkB/IWSGLzU=", "owner": "nix-community", "repo": "home-manager", - "rev": "4ac96eb21c101a3e5b77ba105febc5641a8959aa", + "rev": "b5ed4afc2277339bdf0e9edf59befff7350cf075", "type": "github" }, "original": { @@ -933,11 +933,11 @@ ] }, "locked": { - "lastModified": 1762146130, - "narHash": "sha256-/XOEA0a61fZ45i/BpaSsyLNNbw/yKwjMbkB/IWSGLzU=", + "lastModified": 1762351818, + "narHash": "sha256-0ptUDbYwxv1kk/uzEX4+NJjY2e16MaAhtzAOJ6K0TG0=", "owner": "nix-community", "repo": "home-manager", - "rev": "b5ed4afc2277339bdf0e9edf59befff7350cf075", + "rev": "b959c67241cae17fc9e4ee7eaf13dfa8512477ea", "type": "github" }, "original": { @@ -1072,11 +1072,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1761869718, - "narHash": "sha256-jLfwwlPGpnGRAtVDyoGj9FgH2D9hWwyEu0yHkflG2EI=", + "lastModified": 1762269308, + "narHash": "sha256-3fTMnF1E7BsZ7NlmFmPo6+SRFm4FELP45IDLHcGLZ1s=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "8e9add2afda58d233a75e4c5ce8503b24fa59ceb", + "rev": "46b71eda6423cc9c3b19cb310c3344e81ac624c5", "type": "github" }, "original": { @@ -1273,11 +1273,11 @@ ] }, "locked": { - "lastModified": 1759619523, - "narHash": "sha256-r1ed7AR2ZEb2U8gy321/Xcp1ho2tzn+gG1te/Wxsj1A=", + "lastModified": 1762208756, + "narHash": "sha256-hC1jb4tdjFfEuU18KQiMgz5XPAO+d5SfbjAUS7haLl4=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "3df7bde01efb3a3e8e678d1155f2aa3f19e177ef", + "rev": "164a30b3d8b3174a32ac7326782476f1188e6118", "type": "github" }, "original": { @@ -1466,11 +1466,11 @@ "nixpkgs": "nixpkgs_13" }, "locked": { - "lastModified": 1762128253, - "narHash": "sha256-U8N1W90dSQJZ8q0xl3aRC4JBp1c9nxxUcVmTO/zhqbk=", + "lastModified": 1762301120, + "narHash": "sha256-/BJTnu8R12gY1ukPlSLuNmRZqVj2g+ci/DGLOTmUG4g=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "1af775f26be88b3c5177a9fd23f7f4002bdeaf61", + "rev": "b5d560fa4ee4f2e0789215de9e089fbab9d0e44a", "type": "github" }, "original": { @@ -1482,11 +1482,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1762102676, - "narHash": "sha256-x2ZQGCkjdYmwMrtKwSjtS6UcBa+VbL2ynzZcv8cgeI0=", + "lastModified": 1762282297, + "narHash": "sha256-oXLHH4EIrXANnJVese+WJpHY0RHY1uptX6iw8EitrQs=", "owner": "neovim", "repo": "neovim", - "rev": "130ef73e39ee011c40af96624d0c8ef0fa426b09", + "rev": "20a392fe38431259d35a1c94ad39daee77aeb402", "type": "github" }, "original": { @@ -1751,11 +1751,11 @@ }, "nixpkgs_13": { "locked": { - "lastModified": 1761880412, - "narHash": "sha256-QoJjGd4NstnyOG4mm4KXF+weBzA2AH/7gn1Pmpfcb0A=", + "lastModified": 1762156382, + "narHash": "sha256-Yg7Ag7ov5+36jEFC1DaZh/12SEXo6OO3/8rqADRxiqs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a7fc11be66bdfb5cdde611ee5ce381c183da8386", + "rev": "7241bcbb4f099a66aafca120d37c65e8dda32717", "type": "github" }, "original": { @@ -1767,11 +1767,11 @@ }, "nixpkgs_14": { "locked": { - "lastModified": 1761907660, - "narHash": "sha256-kJ8lIZsiPOmbkJypG+B5sReDXSD1KGu2VEPNqhRa/ew=", + "lastModified": 1762111121, + "narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2fb006b87f04c4d3bdf08cfdbc7fab9c13d94a15", + "rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4", "type": "github" }, "original": { @@ -1879,11 +1879,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1761907660, - "narHash": "sha256-kJ8lIZsiPOmbkJypG+B5sReDXSD1KGu2VEPNqhRa/ew=", + "lastModified": 1762111121, + "narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2fb006b87f04c4d3bdf08cfdbc7fab9c13d94a15", + "rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4", "type": "github" }, "original": { @@ -1911,11 +1911,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1761907660, - "narHash": "sha256-kJ8lIZsiPOmbkJypG+B5sReDXSD1KGu2VEPNqhRa/ew=", + "lastModified": 1762111121, + "narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2fb006b87f04c4d3bdf08cfdbc7fab9c13d94a15", + "rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4", "type": "github" }, "original": { @@ -2081,11 +2081,11 @@ "systems": "systems_11" }, "locked": { - "lastModified": 1762093557, - "narHash": "sha256-esmyNNa8TvduITLfqYPSMroyZ9vxJr2nsvjYmHmO+Ag=", + "lastModified": 1762353527, + "narHash": "sha256-67/sO6zaf02ZPz2s6k8swg6WMExz0gls7o4jmoljwl8=", "owner": "notashelf", "repo": "nvf", - "rev": "20d8fca94dceaf943686598da7fba31b37100e50", + "rev": "3d3cd879783be1457edfb42a38f392071335edd1", "type": "github" }, "original": { @@ -2253,11 +2253,11 @@ ] }, "locked": { - "lastModified": 1761964689, - "narHash": "sha256-Zo3LQQDz+64EQ9zor/WmeNTFLoZkjmhp0UY3G0D3seE=", + "lastModified": 1762137611, + "narHash": "sha256-sTqb10FR/YQCuGbw16qxliX0NFlYg6evSEjN8w+9IYE=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "63d22578600f70d293aede6bc737efef60ebd97f", + "rev": "3a0ebe5d2965692f990cb27e62f501ad35e3deeb", "type": "github" }, "original": { @@ -2303,11 +2303,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1762101397, - "narHash": "sha256-wGiL2K3kAyBBmIZpJEskaSIgyzzpg0zwfvri+Sy6/CI=", + "lastModified": 1762264356, + "narHash": "sha256-QVfC53Ri+8n3e7Ujx9kq6all3+TLBRRPRnc6No5qY5w=", "owner": "danth", "repo": "stylix", - "rev": "8c0640d5722a02178c8ee80a62c5f019cab4b3c1", + "rev": "647bb8dd96a206a1b79c4fd714affc88b409e10b", "type": "github" }, "original": { @@ -2692,11 +2692,11 @@ ] }, "locked": { - "lastModified": 1760713634, - "narHash": "sha256-5HXelmz2x/uO26lvW7MudnadbAfoBnve4tRBiDVLtOM=", + "lastModified": 1761431178, + "narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "753bbbdf6a052994da94062e5b753288cef28dfb", + "rev": "4b8801228ff958d028f588f0c2b911dbf32297f9", "type": "github" }, "original": { @@ -2713,11 +2713,11 @@ ] }, "locked": { - "lastModified": 1762131860, - "narHash": "sha256-sIPhzkDrfe6ptthZiwoxQyO6rKd9PgJnl+LOyythQkI=", + "lastModified": 1762341281, + "narHash": "sha256-lbNi1N90hKCsFNKn7i9CAehyEfohmTHlvztKvTY0pDc=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "10e69cb268b1d3dc91135e72f5462b2acfbcc3aa", + "rev": "21a72764b637a936a1b2a056082e36c6ceb07aed", "type": "github" }, "original": {