Replace deprecated lib.crossLists

This commit is contained in:
SebastianStork 2024-05-07 15:51:08 +02:00
parent 8c00e1f120
commit 225b15f303

View file

@ -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