home: zsh: extract aliases
All checks were successful
ci/woodpecker/push/check Pipeline was successful

It doesn't (yet?) support nushell, if I ever end up switching to it.
This commit is contained in:
Bruno BELANYI 2023-05-03 20:19:17 +01:00
parent 4feee73b8e
commit 9f3a8ac2bd
3 changed files with 27 additions and 13 deletions

26
home/aliases/default.nix Normal file
View file

@ -0,0 +1,26 @@
{ config, lib, ... }:
let
cfg = config.my.home.aliases;
in
{
options.my.home.aliases = with lib; {
enable = my.mkDisableOption "shell aliases configuration";
};
config = lib.mkIf cfg.enable {
home = {
shellAliases = {
# I like pretty colors
diff = "diff --color=auto";
grep = "grep --color=auto";
egrep = "egrep --color=auto";
fgrep = "fgrep --color=auto";
ls = "ls --color=auto";
# Well-known ls aliases
l = "ls -alh";
ll = "ls -l";
};
};
};
}

View file

@ -1,6 +1,7 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./aliases
./atuin ./atuin
./bat ./bat
./bluetooth ./bluetooth

View file

@ -88,19 +88,6 @@ in
AGKOZAK_LEFT_PROMPT_ONLY = 1; AGKOZAK_LEFT_PROMPT_ONLY = 1;
}; };
shellAliases = {
# I like pretty colors
diff = "diff --color=auto";
grep = "grep --color=auto";
egrep = "egrep --color=auto";
fgrep = "fgrep --color=auto";
ls = "ls --color=auto";
# Well-known ls aliases
l = "ls -alh";
ll = "ls -l";
};
# Enable VTE integration # Enable VTE integration
enableVteIntegration = true; enableVteIntegration = true;
}; };