Added tmux to dingserver
This commit is contained in:
@@ -64,15 +64,6 @@
|
|||||||
EDITOR = "hx";
|
EDITOR = "hx";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
ohMyZsh = {
|
|
||||||
enable = true;
|
|
||||||
plugins = ["git" "fzf"];
|
|
||||||
theme = "agnoster";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
openssh.enable = true;
|
openssh.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
./caddy.nix
|
./caddy.nix
|
||||||
./synapse.nix
|
./synapse.nix
|
||||||
./prometheus.nix
|
./prometheus.nix
|
||||||
|
./tmux.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Force disable the common boot loader
|
# Force disable the common boot loader
|
||||||
|
|||||||
38
hosts/dingserver/tmux.nix
Normal file
38
hosts/dingserver/tmux.nix
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{...}: {
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
keyMode = "vi";
|
||||||
|
terminal = "tmux-256color";
|
||||||
|
escapeTime = 0;
|
||||||
|
baseIndex = 1;
|
||||||
|
historyLimit = 10000;
|
||||||
|
clock24 = true;
|
||||||
|
extraConfig = ''
|
||||||
|
unbind-key -a -T prefix
|
||||||
|
unbind-key -a -T root
|
||||||
|
unbind-key -a -T copy-mode
|
||||||
|
unbind-key -a -T copy-mode-vi
|
||||||
|
|
||||||
|
set -g prefix M-w
|
||||||
|
|
||||||
|
bind q detach
|
||||||
|
bind space copy-mode
|
||||||
|
bind -T copy-mode-vi Escape send-keys -X cancel
|
||||||
|
|
||||||
|
bind -T copy-mode-vi Escape send -X cancel
|
||||||
|
bind -T copy-mode-vi k send -X cursor-up
|
||||||
|
bind -T copy-mode-vi j send -X cursor-down
|
||||||
|
bind -T copy-mode-vi h send -X cursor-left
|
||||||
|
bind -T copy-mode-vi l send -X cursor-right
|
||||||
|
|
||||||
|
bind -T copy-mode-vi Space send -X begin-selection
|
||||||
|
bind -T copy-mode-vi y send -X copy-selection-no-clear
|
||||||
|
bind -T copy-mode-vi Enter send -X copy-selection-and-cancel
|
||||||
|
|
||||||
|
set -g mouse on
|
||||||
|
bind -n WheelUpPane copy-mode -e
|
||||||
|
bind -T copy-mode-vi WheelUpPane send -X -N 5 scroll-up
|
||||||
|
bind -T copy-mode-vi WheelDownPane send -X -N 5 scroll-down
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -150,6 +150,9 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
enableAutosuggestions = true;
|
enableAutosuggestions = true;
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
|
if [ -n "$TMUX" ]; then
|
||||||
|
setopt ignoreeof
|
||||||
|
fi
|
||||||
eval "$(direnv hook zsh)"
|
eval "$(direnv hook zsh)"
|
||||||
'';
|
'';
|
||||||
oh-my-zsh = {
|
oh-my-zsh = {
|
||||||
|
|||||||
Reference in New Issue
Block a user