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 |
| 4 | config.environment.systemPackages = with pkgs; [ |
| 5 | jq |
Skyler Grey | a61c120 | 2022-09-05 02:56:20 +0100 | [diff] [blame] | 6 | bc |
Skyler Grey | dd7a5e1 | 2022-09-04 21:24:15 +0100 | [diff] [blame] | 7 | (sd.overrideAttrs (oldAttrs: { |
| 8 | postInstall = '' |
| 9 | mv $out/bin/sd $out/bin/s |
| 10 | ''; |
| 11 | })) |
Skyler Grey | 7418e82 | 2022-09-01 23:57:06 +0100 | [diff] [blame] | 12 | lnav |
| 13 | ]; |
Skyler Grey | 59e2ebe | 2022-09-04 19:14:20 +0100 | [diff] [blame] | 14 | |
| 15 | home = { |
| 16 | programs = { |
| 17 | exa.enable = true; |
| 18 | bat.enable = true; |
| 19 | zsh.initExtra = '' |
Skyler Grey | 1010db9 | 2022-09-05 03:21:48 +0100 | [diff] [blame] | 20 | function ls { |
| 21 | if [ -t 1 ] ; then |
| 22 | ${pkgs.exa}/bin/exa --icons -lghF --git --group-directories-first --color always "$@" | less --quit-if-one-screen |
| 23 | else |
| 24 | ${pkgs.coreutils}/bin/ls "$@" |
| 25 | fi |
| 26 | } |
| 27 | unalias ls |
Skyler Grey | 59e2ebe | 2022-09-04 19:14:20 +0100 | [diff] [blame] | 28 | ''; |
| 29 | }; |
| 30 | home.shellAliases = { |
| 31 | cat = "${pkgs.bat}/bin/bat --wrap never --pager \"less -+S\""; |
| 32 | }; |
| 33 | }; |
Skyler Grey | 7418e82 | 2022-09-01 23:57:06 +0100 | [diff] [blame] | 34 | } |