blob: 99e125326bc4e608719f316dd551ab63e668fcb6 [file] [log] [blame]
Skyler Grey7418e822022-09-01 23:57:06 +01001{pkgs, ...}: {
2 # Basic shell scripting utilities, they don't deserve their own file but I use
3 # them
4 config.environment.systemPackages = with pkgs; [
5 jq
Skyler Greydd7a5e12022-09-04 21:24:15 +01006 (sd.overrideAttrs (oldAttrs: {
7 postInstall = ''
8 mv $out/bin/sd $out/bin/s
9 '';
10 }))
Skyler Grey7418e822022-09-01 23:57:06 +010011 lnav
12 ];
Skyler Grey59e2ebe2022-09-04 19:14:20 +010013
14 home = {
15 programs = {
16 exa.enable = true;
17 bat.enable = true;
18 zsh.initExtra = ''
19 function ls {
20 if [ -t 1 ] ; then
21 ${pkgs.exa}/bin/exa --icons -lghF --git --group-directories-first --color always "$@" | less --quit-if-one-screen
22 else
23 ${pkgs.coreutils}/bin/ls "$@"
24 fi
25 }
26 unalias ls
27 '';
28 };
29 home.shellAliases = {
30 cat = "${pkgs.bat}/bin/bat --wrap never --pager \"less -+S\"";
31 };
32 };
Skyler Grey7418e822022-09-01 23:57:06 +010033}