blob: 1e89f5857226a34e9341ba7e63e0ddd68f40ba04 [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 Grey5385f042022-10-31 00:24:37 +000021 gping
Skyler Greybb2e74c2023-01-26 00:50:09 +000022 curlie
Skyler Grey338edab2023-02-19 23:52:15 +000023 xcolor
Skyler Greya9887392023-01-25 21:39:25 +000024 /* tcount */ # Seems to cause extremely high build times repeatedly: check GC
Skyler Grey341ba3c2022-10-31 00:09:34 +000025 ];
Skyler Grey341ba3c2022-10-31 00:09:34 +000026 };
Skyler Grey59e2ebe2022-09-04 19:14:20 +010027
28 home = {
29 programs = {
30 exa.enable = true;
31 bat.enable = true;
32 zsh.initExtra = ''
Skyler Grey1010db92022-09-05 03:21:48 +010033 function ls {
34 if [ -t 1 ] ; then
35 ${pkgs.exa}/bin/exa --icons -lghF --git --group-directories-first --color always "$@" | less --quit-if-one-screen
36 else
37 ${pkgs.coreutils}/bin/ls "$@"
38 fi
39 }
40 unalias ls
Skyler Grey59e2ebe2022-09-04 19:14:20 +010041 '';
42 };
43 home.shellAliases = {
44 cat = "${pkgs.bat}/bin/bat --wrap never --pager \"less -+S\"";
Skyler Grey341ba3c2022-10-31 00:09:34 +000045 dig = "${pkgs.dogdns}/bin/dog";
46 ip = "${pkgs.iproute2}/bin/ip -c --brief";
47 ipo = "${pkgs.iproute2}/bin/ip";
Skyler Grey341ba3c2022-10-31 00:09:34 +000048 ps = "${pkgs.procs}/bin/procs";
Skyler Greycb2e9482022-10-31 00:15:16 +000049 htop = "${pkgs.btop}/bin/btop";
Skyler Greyc07d8e72022-10-31 00:33:48 +000050 ping = "${pkgs.gping}/bin/gping";
Skyler Greybb2e74c2023-01-26 00:50:09 +000051 curl = "${pkgs.curlie}/bin/curlie";
Skyler Grey222211a2023-02-18 17:25:15 +000052 clip = "${pkgs.xclip}/bin/xclip -selection clip";
Skyler Greyf09390e2022-11-02 08:11:29 +000053 nix-provider = "${./utilities/nix-provider.sh}";
Skyler Grey59e2ebe2022-09-04 19:14:20 +010054 };
55 };
Skyler Grey7418e822022-09-01 23:57:06 +010056}