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 |
| 20 | ]; |
| 21 | programs.liboping.enable = true; |
| 22 | }; |
Skyler Grey | 59e2ebe | 2022-09-04 19:14:20 +0100 | [diff] [blame] | 23 | |
| 24 | home = { |
| 25 | programs = { |
| 26 | exa.enable = true; |
| 27 | bat.enable = true; |
| 28 | zsh.initExtra = '' |
Skyler Grey | 1010db9 | 2022-09-05 03:21:48 +0100 | [diff] [blame] | 29 | function ls { |
| 30 | if [ -t 1 ] ; then |
| 31 | ${pkgs.exa}/bin/exa --icons -lghF --git --group-directories-first --color always "$@" | less --quit-if-one-screen |
| 32 | else |
| 33 | ${pkgs.coreutils}/bin/ls "$@" |
| 34 | fi |
| 35 | } |
| 36 | unalias ls |
Skyler Grey | 59e2ebe | 2022-09-04 19:14:20 +0100 | [diff] [blame] | 37 | ''; |
| 38 | }; |
| 39 | home.shellAliases = { |
| 40 | cat = "${pkgs.bat}/bin/bat --wrap never --pager \"less -+S\""; |
Skyler Grey | 341ba3c | 2022-10-31 00:09:34 +0000 | [diff] [blame] | 41 | dig = "${pkgs.dogdns}/bin/dog"; |
| 42 | ip = "${pkgs.iproute2}/bin/ip -c --brief"; |
| 43 | ipo = "${pkgs.iproute2}/bin/ip"; |
| 44 | ping = "noping"; |
| 45 | p = "noping"; |
| 46 | pingo = "oping"; |
| 47 | cp = "${pkgs.xcp}/bin/xcp"; |
| 48 | cpo = "${pkgs.coreutils}/bin/cp"; |
| 49 | ps = "${pkgs.procs}/bin/procs"; |
Skyler Grey | 59e2ebe | 2022-09-04 19:14:20 +0100 | [diff] [blame] | 50 | }; |
| 51 | }; |
Skyler Grey | 7418e82 | 2022-09-01 23:57:06 +0100 | [diff] [blame] | 52 | } |