-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzsh.nix
55 lines (47 loc) · 1.78 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
{ pkgs, ... }:
{
programs.zsh = {
enable = true;
# enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
autocd = true;
defaultKeymap = "viins";
# configuration not settable elsewhere, gets set to .zshrc
initExtra = ''
autoload -U colors && colors
export PS1="%{$fg[green]%}[ %n%{$fg[blue]%}@%m %~ %{$fg[green]%}]%{$reset_color%} "
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^[[A" history-beginning-search-backward-end
bindkey "^[[B" history-beginning-search-forward-end
bindkey -M viins 'hc' vi-cmd-mode
bindkey "^P" up-line-or-search
bindkey "^N" down-line-or-search
cbonsai -p # show cool bonsai tree on startup : )
'';
prezto = {
enable = true;
caseSensitive = true;
editor.keymap = "vi";
};
shellAliases = {
n = "nvim";
t = "tmux";
ls = "eza --icons auto";
nsh = "nix-shell";
mux = "tmuxinator";
dock = "result=\${PWD##*/} && docker exec -ti \${result:-/} \${1:-/bin/bash}";
showLatestNixChanges = "nix store diff-closures \$(\\ls -d /nix/var/nix/profiles/*|tail -2)";
nix-update = "su -c \"nix-channel --update && cd /etc/nixos/ && nix flake update && sudo nixos-rebuild switch\" && showLatestNixChanges";
home-update = "sudo -i nix-channel --update && nix flake update && home-manager switch";
system-update = "nix-update && home-update";
timer-work = "timer -f 45m && dunstify \"Timer\" \"Work session ended\"";
timer-break = "timer -f 20m && dunstify \"Timer\" \"Break session ended\"";
};
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
};
};
}