blob: 16096f9be4e2952e53aa603698b73ffd2e64dd2c [file] [log] [blame]
Skyler Grey7418e822022-09-01 23:57:06 +01001{pkgs, ...}: {
2 # 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
16 xcp
17 fd
18 procs
19 grex
20 ];
21 programs.liboping.enable = true;
22 };
Skyler Grey59e2ebe2022-09-04 19:14:20 +010023
24 home = {
25 programs = {
26 exa.enable = true;
27 bat.enable = true;
28 zsh.initExtra = ''
Skyler Grey1010db92022-09-05 03:21:48 +010029 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 Grey59e2ebe2022-09-04 19:14:20 +010037 '';
38 };
39 home.shellAliases = {
40 cat = "${pkgs.bat}/bin/bat --wrap never --pager \"less -+S\"";
Skyler Grey341ba3c2022-10-31 00:09:34 +000041 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 Grey59e2ebe2022-09-04 19:14:20 +010050 };
51 };
Skyler Grey7418e822022-09-01 23:57:06 +010052}