From 225b15f30345bba399a588a1bf57205974d9fd58 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Tue, 7 May 2024 15:51:08 +0200 Subject: [PATCH] Replace deprecated lib.crossLists --- modules/home/shell/enhancement.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/home/shell/enhancement.nix b/modules/home/shell/enhancement.nix index 6c0513a..a1d15a2 100644 --- a/modules/home/shell/enhancement.nix +++ b/modules/home/shell/enhancement.nix @@ -17,7 +17,16 @@ home.shellAliases = let lsAliases = let listCmd = "${lib.getExe pkgs.eza} --header --group --time-style=long-iso --group-directories-first --sort=name --icons=auto --git --git-repos-no-status --binary"; - aliasList = lib.crossLists (a: b: c: "${a}${b}${c}") [["ll" "lt" "l"] ["" "a"] ["" "d" "f"]]; + aliasList = lib.mapCartesianProduct ({ + a, + b, + c, + }: + a + b + c) { + a = ["ll" "lt" "l"]; + b = ["" "a"]; + c = ["" "d" "f"]; + }; convertAliasToCmd = str: "${listCmd} " + (builtins.replaceStrings ["ll" "lt" "l" "a" "d" "f"] ["--long " "--tree " "--oneline --dereference " "--all " "--only-dirs " "--only-files "] str); aliasAttrs = lib.genAttrs aliasList convertAliasToCmd; in