blob: e8189f2d2b949b1f7b477d633fb2730663ac90f6 [file] [log] [blame]
Skyler Grey252927a2022-10-18 22:18:15 +01001{ pkgs, ... }: {
Skyler Grey7418e822022-09-01 23:57:06 +01002 # Basic shell scripting utilities, they don't deserve their own file but I use
3 # them
Skyler Grey341ba3c2022-10-31 00:09:34 +00004 config = {
5 environment.systemPackages = with pkgs; [
6 jq
7 bc
8 (sd.overrideAttrs (oldAttrs: {
9 postInstall = ''
10 mv $out/bin/sd $out/bin/s
11 '';
12 }))
13 lnav
14 dogdns
15 iproute2
Skyler Grey341ba3c2022-10-31 00:09:34 +000016 fd
17 procs
18 grex
Skyler Greycb2e9482022-10-31 00:15:16 +000019 btop
20 rustscan
Skyler Greyfbbf91e2023-03-11 19:20:41 +000021 graphicsmagick
Skyler Grey5385f042022-10-31 00:24:37 +000022 gping
Skyler Greybb2e74c2023-01-26 00:50:09 +000023 curlie
Skyler Grey338edab2023-02-19 23:52:15 +000024 xcolor
Skyler Greya9887392023-01-25 21:39:25 +000025 /* tcount */ # Seems to cause extremely high build times repeatedly: check GC
Skyler Grey341ba3c2022-10-31 00:09:34 +000026 ];
Skyler Grey341ba3c2022-10-31 00:09:34 +000027 };
Skyler Grey59e2ebe2022-09-04 19:14:20 +010028
29 home = {
30 programs = {
31 exa.enable = true;
32 bat.enable = true;
33 zsh.initExtra = ''
Skyler Grey1010db92022-09-05 03:21:48 +010034 function ls {
35 if [ -t 1 ] ; then
36 ${pkgs.exa}/bin/exa --icons -lghF --git --group-directories-first --color always "$@" | less --quit-if-one-screen
37 else
38 ${pkgs.coreutils}/bin/ls "$@"
39 fi
40 }
41 unalias ls
Skyler Grey59e2ebe2022-09-04 19:14:20 +010042 '';
43 };
44 home.shellAliases = {
45 cat = "${pkgs.bat}/bin/bat --wrap never --pager \"less -+S\"";
Skyler Grey341ba3c2022-10-31 00:09:34 +000046 dig = "${pkgs.dogdns}/bin/dog";
47 ip = "${pkgs.iproute2}/bin/ip -c --brief";
48 ipo = "${pkgs.iproute2}/bin/ip";
Skyler Grey341ba3c2022-10-31 00:09:34 +000049 ps = "${pkgs.procs}/bin/procs";
Skyler Greycb2e9482022-10-31 00:15:16 +000050 htop = "${pkgs.btop}/bin/btop";
Skyler Greyc07d8e72022-10-31 00:33:48 +000051 ping = "${pkgs.gping}/bin/gping";
Skyler Greybb2e74c2023-01-26 00:50:09 +000052 curl = "${pkgs.curlie}/bin/curlie";
Skyler Grey222211a2023-02-18 17:25:15 +000053 clip = "${pkgs.xclip}/bin/xclip -selection clip";
Skyler Greyf09390e2022-11-02 08:11:29 +000054 nix-provider = "${./utilities/nix-provider.sh}";
Skyler Greyfbbf91e2023-03-11 19:20:41 +000055 gm = "${pkgs.graphicsmagick}/bin/gm";
Skyler Grey59e2ebe2022-09-04 19:14:20 +010056 };
57 };
Skyler Grey7418e822022-09-01 23:57:06 +010058}