Skyler Grey | 7418e82 | 2022-09-01 23:57:06 +0100 | [diff] [blame] | 1 | {pkgs, ...}: { |
| 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 |
| 16 | xcp |
| 17 | fd |
| 18 | procs |
| 19 | grex |
Skyler Grey | cb2e948 | 2022-10-31 00:15:16 +0000 | [diff] [blame] | 20 | btop |
| 21 | rustscan |
Skyler Grey | 341ba3c | 2022-10-31 00:09:34 +0000 | [diff] [blame] | 22 | ]; |
| 23 | programs.liboping.enable = true; |
| 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"; |
| 46 | ping = "noping"; |
| 47 | p = "noping"; |
| 48 | pingo = "oping"; |
| 49 | cp = "${pkgs.xcp}/bin/xcp"; |
| 50 | cpo = "${pkgs.coreutils}/bin/cp"; |
| 51 | ps = "${pkgs.procs}/bin/procs"; |
Skyler Grey | cb2e948 | 2022-10-31 00:15:16 +0000 | [diff] [blame] | 52 | htop = "${pkgs.btop}/bin/btop"; |
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 | } |