-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzsh.nix
90 lines (80 loc) · 2.69 KB
/
zsh.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{ pkgs, unstable-pkgs, ... }:
{
programs.zsh = {
enable = true;
autocd = true;
dirHashes = { kawaka = "$HOME/code/kawaka"; };
syntaxHighlighting = { enable = true; };
shellAliases = {
l = "ls -ahG";
e = "nvim";
szsh = "source ~/.zshrc";
gmt = "git machete traverse";
gms = "git machete status";
gma = "git machete add";
gmc = "git machete delete-unmanaged";
gmd = "git machete discover";
buildT = "rush build -T .";
buildt = "rush build -t .";
buildo = "rush build -o";
gcc = "gnome-control-center network";
tail-rimu-logs = "tail -f ~/.config/Koordinates/logs/*.log";
get-latest-rimu-log =
"echo ~/.config/Koordinates/logs/$(ls -Art ~/.config/Koordinates/logs | tail -n 1)";
search-latest-rimu-log = "cat $(get-latest-rimu-log) | grep";
hms =
"sudo nixos-rebuild switch --flake ~/dotfiles#ubermouse --cores 10 -j 10";
show-trace = "npx playwright@1.48.0 show-trace";
heft = "node_modules/.bin/heft";
xclip = "xclip -selection clipboard";
rf = "rm common/temp/rush*lock";
};
oh-my-zsh = {
enable = true;
custom = "$HOME/dotfiles/zsh-customizations";
plugins = [
"git"
"command-not-found"
"git-flow"
"direnv"
];
};
plugins = [
{
name = "powerlevel10k-config";
src = ./p10k;
file = "p10k.zsh";
}
{
name = "zsh-powerlevel10k";
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/";
file = "powerlevel10k.zsh-theme";
}
];
initExtraFirst = ''
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
fi
'';
initExtra = ''
export PLAYWRIGHT_BROWSERS_PATH="${unstable-pkgs.playwright-driver.browsers}"
export KAWAKA_SKIP_PLAYWRIGHT_FIREFOX="1"
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD="1"
export PATH="$PATH:/home/taylorl/.pnpm-packages/bin"
function kill-all {
ps -ef | grep [$1] | awk '{print $2}' | xargs kill -9
}
(( ${"$"}{+commands[rush]} )) && {
_rush_completion() {
compadd -- $(rush tab-complete --position ${"$"}{CURSOR} --word "${
"$"
}{BUFFER}" 2>>/dev/null)
}
compdef _rush_completion rush
}
'';
};
}