1{ config, ... }:
2{
3 programs.zsh = {
4 enable = true;
5 dotDir = "${config.xdg.configHome}/zsh";
6 shellAliases = {
7 switch = "~/config/switch";
8
9 jf = "jj git fetch";
10 e = "jj edit";
11 d = "jj desc";
12 moveself = "jj rebase -s @ -d";
13 logall = "jj log -r 'all()'";
14 um = "jj log -r 'unmerged()'";
15 cherry = "jj git fetch && jj split -i -p -m 'SPLIT_CHANGES' && jj edit -r 'description(\"SPLIT_CHANGES\")' && jj desc -m '' --edit";
16 };
17 # SSH sessions get a locked login keychain, which breaks git's osxkeychain helper.
18 profileExtra = ''
19 if [[ "$OSTYPE" == darwin* && -n "$SSH_CONNECTION" ]] \
20 && ! security show-keychain-info >/dev/null 2>&1; then
21 security unlock-keychain
22 fi
23 '';
24 initContent = builtins.readFile ./init.zsh;
25 };
26}