blob: 0d98cd90dd36cdf7e08324b5960dc0fc2700394f [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 Greya61c1202022-09-05 02:56:20 +01006 bc
Skyler Greydd7a5e12022-09-04 21:24:15 +01007 (sd.overrideAttrs (oldAttrs: {
8 postInstall = ''
9 mv $out/bin/sd $out/bin/s
10 '';
11 }))
Skyler Grey7418e822022-09-01 23:57:06 +010012 lnav
13 ];
Skyler Grey59e2ebe2022-09-04 19:14:20 +010014
15 home = {
16 programs = {
17 exa.enable = true;
18 bat.enable = true;
19 zsh.initExtra = ''
Skyler Grey1010db92022-09-05 03:21:48 +010020 function ls {
21 if [ -t 1 ] ; then
22 ${pkgs.exa}/bin/exa --icons -lghF --git --group-directories-first --color always "$@" | less --quit-if-one-screen
23 else
24 ${pkgs.coreutils}/bin/ls "$@"
25 fi
26 }
27 unalias ls
Skyler Grey59e2ebe2022-09-04 19:14:20 +010028 '';
29 };
30 home.shellAliases = {
31 cat = "${pkgs.bat}/bin/bat --wrap never --pager \"less -+S\"";
32 };
33 };
Skyler Grey7418e822022-09-01 23:57:06 +010034}