Exempt aliases.nix from auto formatting

This commit is contained in:
SebastianStork 2024-11-23 00:02:10 +01:00
parent 229ee345f8
commit b2cad2defa
2 changed files with 7 additions and 51 deletions

View file

@ -6,4 +6,5 @@
prettier.enable = true;
just.enable = true;
};
settings.formatter.nixfmt.excludes = [ "modules/home/shell/aliases.nix" ];
}).config.build

View file

@ -11,64 +11,19 @@
pkgs.bat
];
home.shellAliases =
home.shellAliases =
let
lsAliases =
lsAliases =
let
aliasList =
lib.mapCartesianProduct
(
{
a,
b,
c,
}:
a + b + c
)
{
a = [
"ll"
"lt"
"l"
];
b = [
""
"a"
];
c = [
""
"d"
"f"
];
};
convertAliasToCmd =
str:
"eza --header --group --time-style=long-iso --group-directories-first --sort=name --icons=auto --git --git-repos-no-status --binary "
+ (builtins.replaceStrings
[
"ll"
"lt"
"l"
"a"
"d"
"f"
]
[
"--long "
"--tree "
"--oneline --dereference "
"--all "
"--only-dirs "
"--only-files "
]
str
);
aliasList = lib.mapCartesianProduct ({ a, b, c }: a + b + c) { a = ["ll" "lt" "l"]; b = ["" "a"]; c = ["" "d" "f"]; };
eza = "eza --header --group --time-style=long-iso --group-directories-first --sort=name --icons=auto --git --git-repos-no-status --binary ";
convertAliasToCmd = str: eza + (builtins.replaceStrings ["ll" "lt" "l" "a" "d" "f"] ["--long " "--tree " "--oneline --dereference " "--all " "--only-dirs " "--only-files "] str);
in
(lib.genAttrs aliasList convertAliasToCmd) // { ls = "l"; };
catAlias =
let
theme =
theme =
{
dark = "";
light = "GitHub";