Add exa and bat
- Exa is a replacement for ls
- Bat is a replacement for cat
- We'll alias both of them to fully replace the old versions
diff --git a/modules/utilities.nix b/modules/utilities.nix
index 48a09aa..87b8657 100644
--- a/modules/utilities.nix
+++ b/modules/utilities.nix
@@ -5,4 +5,24 @@
jq
lnav
];
+
+ home = {
+ programs = {
+ exa.enable = true;
+ bat.enable = true;
+ zsh.initExtra = ''
+ function ls {
+ if [ -t 1 ] ; then
+ ${pkgs.exa}/bin/exa --icons -lghF --git --group-directories-first --color always "$@" | less --quit-if-one-screen
+ else
+ ${pkgs.coreutils}/bin/ls "$@"
+ fi
+ }
+ unalias ls
+ '';
+ };
+ home.shellAliases = {
+ cat = "${pkgs.bat}/bin/bat --wrap never --pager \"less -+S\"";
+ };
+ };
}