Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 1 | { pkgs, ... }: { |
Skyler Grey | 7418e82 | 2022-09-01 23:57:06 +0100 | [diff] [blame] | 2 | # Basic shell scripting utilities, they don't deserve their own file but I use |
| 3 | # them |
Skyler Grey | 341ba3c | 2022-10-31 00:09:34 +0000 | [diff] [blame] | 4 | 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 Grey | 341ba3c | 2022-10-31 00:09:34 +0000 | [diff] [blame] | 16 | fd |
| 17 | procs |
| 18 | grex |
Skyler Grey | cb2e948 | 2022-10-31 00:15:16 +0000 | [diff] [blame] | 19 | btop |
| 20 | rustscan |
Skyler Grey | 5385f04 | 2022-10-31 00:24:37 +0000 | [diff] [blame] | 21 | gping |
Skyler Grey | bb2e74c | 2023-01-26 00:50:09 +0000 | [diff] [blame] | 22 | curlie |
Skyler Grey | 341ba3c | 2022-10-31 00:09:34 +0000 | [diff] [blame] | 23 | ]; |
Skyler Grey | 341ba3c | 2022-10-31 00:09:34 +0000 | [diff] [blame] | 24 | }; |
Skyler Grey | 59e2ebe | 2022-09-04 19:14:20 +0100 | [diff] [blame] | 25 | |
| 26 | home = { |
| 27 | programs = { |
| 28 | exa.enable = true; |
| 29 | bat.enable = true; |
| 30 | zsh.initExtra = '' |
Skyler Grey | 1010db9 | 2022-09-05 03:21:48 +0100 | [diff] [blame] | 31 | function ls { |
| 32 | if [ -t 1 ] ; then |
| 33 | ${pkgs.exa}/bin/exa --icons -lghF --git --group-directories-first --color always "$@" | less --quit-if-one-screen |
| 34 | else |
| 35 | ${pkgs.coreutils}/bin/ls "$@" |
| 36 | fi |
| 37 | } |
| 38 | unalias ls |
Skyler Grey | 59e2ebe | 2022-09-04 19:14:20 +0100 | [diff] [blame] | 39 | ''; |
| 40 | }; |
| 41 | home.shellAliases = { |
| 42 | cat = "${pkgs.bat}/bin/bat --wrap never --pager \"less -+S\""; |
Skyler Grey | 341ba3c | 2022-10-31 00:09:34 +0000 | [diff] [blame] | 43 | dig = "${pkgs.dogdns}/bin/dog"; |
| 44 | ip = "${pkgs.iproute2}/bin/ip -c --brief"; |
| 45 | ipo = "${pkgs.iproute2}/bin/ip"; |
Skyler Grey | 341ba3c | 2022-10-31 00:09:34 +0000 | [diff] [blame] | 46 | ps = "${pkgs.procs}/bin/procs"; |
Skyler Grey | cb2e948 | 2022-10-31 00:15:16 +0000 | [diff] [blame] | 47 | htop = "${pkgs.btop}/bin/btop"; |
Skyler Grey | c07d8e7 | 2022-10-31 00:33:48 +0000 | [diff] [blame] | 48 | ping = "${pkgs.gping}/bin/gping"; |
| 49 | pingo = "${pkgs.inetutils}/bin/ping"; |
Skyler Grey | bb2e74c | 2023-01-26 00:50:09 +0000 | [diff] [blame] | 50 | curl = "${pkgs.curlie}/bin/curlie"; |
| 51 | curio = "${pkgs.curl}/bin/curl"; |
Skyler Grey | f09390e | 2022-11-02 08:11:29 +0000 | [diff] [blame] | 52 | nix-provider = "${./utilities/nix-provider.sh}"; |
Skyler Grey | 59e2ebe | 2022-09-04 19:14:20 +0100 | [diff] [blame] | 53 | }; |
| 54 | }; |
Skyler Grey | 7418e82 | 2022-09-01 23:57:06 +0100 | [diff] [blame] | 55 | } |