helm/users/profiles/cli/default.nix

258 lines
5.7 KiB
Nix
Raw Normal View History

{ self, lib, pkgs, config, ... }:
2022-05-21 20:53:03 -07:00
{
home.packages = with pkgs; [
binutils
coreutils
dnsutils
dosfstools
#git
bottom
gptfdisk
starship
2022-05-21 20:53:03 -07:00
iputils
jq
manix
moreutils
nix-index
cached-nix-shell
nmap
ripgrep
skim
tealdeer
usbutils
utillinux
whois
iftop
wget
curl
exa
bat
fd
2022-06-12 05:32:01 -07:00
ncdu
duf
trash-cli
nix-index
2022-05-21 20:53:03 -07:00
ag
tcpdump
mtr
file
lsof
atool
strace
zip
unzip
rsync
tmux
pwgen
glow
pass
less
gdb
xxd
taskwarrior
yt-dlp
2022-05-21 20:53:03 -07:00
gnupg
syncthing
dijo
#ssb-patchwork
fontconfig
pandoc
];
programs.zsh = {
enable = true;
enableCompletion = true;
enableAutosuggestions = true;
initExtra = ''
2022-05-24 06:18:15 -07:00
bindkey -v
flakify() {
if [ ! -e flake.nix ]; then
nix flake new -t github:nix-community/nix-direnv .
elif [ ! -e .envrc ]; then
echo "use flake" > .envrc
direnv allow
fi
vim flake.nix
}
2022-05-24 06:18:15 -07:00
autopair-init
'';
sessionVariables = {
EDITOR = "nvim";
2022-06-15 18:12:19 -07:00
TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo"; # Needed to run home-manager switch on non-nixOS
};
2022-05-24 06:18:15 -07:00
plugins = [
# {
# name = "zsh-autocomplete";
# src = pkgs.fetchFromGitHub {
# owner = "marlonrichert";
# repo = "zsh-autocomplete";
# rev = "22.01.21";
# sha256 = "+UziTYsjgpiumSulrLojuqHtDrgvuG91+XNiaMD7wIs=";
# };
# }
{
name = "zsh-autopair";
src = pkgs.fetchFromGitHub {
owner = "hlissner";
repo = "zsh-autopair";
rev = "34a8bca0c18fcf3ab1561caef9790abffc1d3d49";
sha256 = "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1";
};
file = "autopair.zsh";
}
{
name = "zsh-syntax-highlighting";
src = pkgs.fetchFromGitHub {
owner = "zsh-users";
repo = "zsh-syntax-highlighting";
rev = "0.6.0";
sha256 = "0zmq66dzasmr5pwribyh4kbkk23jxbpdw4rjxx0i7dx8jjp2lzl4";
};
file = "zsh-syntax-highlighting.zsh";
}
{
name = "zsh-autoquoter";
src = pkgs.fetchFromGitHub {
owner = "ianthehenry";
repo = "zsh-autoquoter";
rev = "819a615fbfd2ad25c5d311080e3a325696b45de7";
sha256 = "r0jdo+YFTOejvNMTqzXi5ftcLzDpuKejX0wMFwqKdJY=";
};
file = "zsh-autoquoter.zsh";
}
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "v0.5.0";
sha256 = "0za4aiwwrlawnia4f29msk822rj9bgcygw6a8a6iikiwzjjz0g91";
};
}
];
};
2022-05-24 06:18:15 -07:00
programs.starship = {
enable = true;
enableZshIntegration = true;
};
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
2022-05-21 20:53:03 -07:00
programs.direnv = {
enable = true;
enableZshIntegration = true;
2022-05-24 06:18:15 -07:00
nix-direnv.enable = true;
nix-direnv.enableFlakes = true;
};
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
2022-05-21 20:53:03 -07:00
services.kdeconnect.enable = true;
home.shellAliases = {
# quick cd
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
"....." = "cd ../../../..";
# kitaab recents
kr = "cd /home/anish/kitaab/vimwiki; ls --sort=modified --reverse | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 {}'";
# modern cli tools
ls = "exa";
l = "exa -l";
2022-06-15 06:04:08 -07:00
li = "exa --icons";
la = "exa -la";
tree = "ls --tree";
cat = "bat";
unzip = "aunpack";
copy = "xclip -selection clipboard";
paste = "xclip -selection clipboard -o";
2022-05-29 07:48:20 -07:00
rm = "echo USE TRASH, FOOL";
trash = "trash-put";
# task warrior
2022-05-29 07:48:20 -07:00
# TODO: make blocked a context?
t = "task -BLOCKED";
tun = "task -BLOCKED -wait";
2022-08-31 04:21:20 -07:00
tr = "task newest limit:page";
2022-05-29 07:48:20 -07:00
tu = "task unblocked -wait";
2022-05-22 06:28:13 -07:00
tl = "task list";
ta = "task add";
2022-05-22 06:20:46 -07:00
tn = "task-note";
tm = "task limit:page";
te = "task edit";
ts = "task sync";
scrot = "flameshot screen -c -p ~/screenshots/";
scrotgui = "flameshot gui -p ~/screenshots/";
# git
g = "git";
# grep
grep = "rg";
gi = "grep -i";
# internet ip
myip = "dig +short myip.opendns.com @208.67.222.222 2>&1";
# nix
n = "nix";
np = "n profile";
ni = "np install";
nr = "np remove";
ns = "n search --no-update-lock-file";
nf = "n flake";
2022-05-29 07:48:20 -07:00
nfl = "nf lock";
nepl = "n repl '<nixpkgs>'";
srch = "ns nixos";
orch = "ns override";
nrb = "cd /tmp; sudo nixos-rebuild switch --flake '/etc/nixos/#curve'; cd $OLDPWD";
nrt = "cd /tmp; sudo nixos-rebuild test --flake '/etc/nixos/#curve'; cd $OLDPWD";
2022-05-29 07:48:20 -07:00
ned = "cd /etc/nixos; vim; cd $OLDPWD";
ncd = "cd /etc/nixos";
mn = ''
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix
'';
# fix nixos-option
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
# sudo
s = "sudo -E ";
pls = "s";
si = "sudo -i";
se = "sudoedit";
# top
top = "btm";
# systemd
ctl = "systemctl";
stl = "s systemctl";
utl = "systemctl --user";
ut = "systemctl --user start";
un = "systemctl --user stop";
up = "s systemctl start";
dn = "s systemctl stop";
jtl = "journalctl";
# quick ssh
2022-05-22 06:20:46 -07:00
kssh = "kitten +kitty ssh";
sm = "ssh 10.0.69.4"; # box over wireguard
2022-05-29 07:48:20 -07:00
smm = "ssh mossnet.lan"; # box regular
2022-05-22 06:20:46 -07:00
ss = "ssh sealight.xyz"; # helix
2022-07-18 23:52:41 -07:00
sl = "ssh 69.61.38.225"; # lituus
2022-05-21 20:53:03 -07:00
};
}