helm/users/profiles/cli/default.nix
2022-05-22 23:28:13 +10:00

185 lines
3.4 KiB
Nix

{ self, lib, pkgs, config, ... }:
{
home.packages = with pkgs; [
binutils
coreutils
dnsutils
dosfstools
#git
bottom
gptfdisk
starship
iputils
jq
manix
moreutils
nix-index
cached-nix-shell
nmap
ripgrep
skim
tealdeer
usbutils
utillinux
whois
iftop
wget
curl
exa
bat
fd
trash-cli
nix-index
ag
tcpdump
mtr
file
lsof
atool
inotify-tools
strace
zip
unzip
rsync
tmux
pwgen
glow
pass
less
gdb
xxd
kitty
taskwarrior
gnupg
syncthing
dijo
flameshot
#ssb-patchwork
libreoffice
fontconfig
pandoc
];
programs.zsh = {
enable = true;
enableCompletion = true;
enableAutosuggestions = true;
initExtra = ''
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
}
'';
sessionVariables = {
EDITOR = "nvim";
};
};
programs.starship = {
enable = true;
enableZshIntegration = true;
};
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
programs.direnv = {
enable = true;
enableZshIntegration = true;
};
services.kdeconnect.enable = true;
home.shellAliases = {
# quick cd
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
"....." = "cd ../../../..";
# modern cli tools
ls = "exa";
l = "exa -l";
la = "exa -la";
tree = "ls --tree";
cat = "bat";
unzip = "aunpack";
copy = "xclip -selection clipboard";
paste = "xclip -selection clipboard -o";
# task warrior
t = "task";
tl = "task list";
ta = "task add";
tn = "task-note";
tm = "task modify";
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";
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";
ned = "cd /etc/nixos; vim";
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
kssh = "kitten +kitty ssh";
sm = "ssh 10.0.69.4"; # box over wireguard
ss = "ssh sealight.xyz"; # helix
sc = "ssh lakhwara.com"; # cube
};
}