Rename module namespaces

This commit is contained in:
SebastianStork 2024-07-15 20:16:50 +02:00
parent 0dcf8cc292
commit ca1357b2d4
35 changed files with 4 additions and 4 deletions

View file

@ -0,0 +1,87 @@
{
config,
pkgs,
lib,
...
}:
{
config = lib.mkIf config.myConfig.shell.zsh.enable {
home.packages = [
pkgs.eza
pkgs.bat
];
home.shellAliases =
let
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
);
in
(lib.genAttrs aliasList convertAliasToCmd) // { ls = "l"; };
catAlias =
let
theme =
{
dark = "";
light = "GitHub";
}
.${config.myConfig.theme};
in
{
cat = "bat --plain --theme=${theme}";
};
in
lib.mkMerge [
lsAliases
catAlias
];
};
}