Compare commits

..

2 commits

Author SHA1 Message Date
3a18c8a920 chore: update flake.lock 2023-10-18 14:54:26 -04:00
2be731d5d2 feat: add tmux hm module 2023-10-18 14:54:24 -04:00
7 changed files with 35 additions and 38 deletions

View file

@ -46,8 +46,9 @@
imports = [ imports = [
nur.hmModules.nur nur.hmModules.nur
./modules/bash ./modules/bash
./modules/git ./modules/git.nix
./modules/neovim ./modules/neovim
./modules/tmux.nix
./hostvars.nix ./hostvars.nix
({ osConfig, ... }: { ({ osConfig, ... }: {

View file

@ -22,28 +22,4 @@
]; ];
}; };
}; };
programs = {
# TODO: install plugins through nix
tmux = {
enable = true;
keyMode = "vi";
terminal = "screen-256color";
newSession = true;
historyLimit = 30000;
extraConfig = ''
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"
set -g mouse on
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
set -g @plugin 'dracula/tmux'
run 'bash -c "$HOME/.tmux/plugins/tpm/tpm ||
${pkgs.git}/bin/git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm &&
$HOME/.tmux/plugins/tpm/tpm"'
'';
};
};
} }

24
common/modules/tmux.nix Normal file
View file

@ -0,0 +1,24 @@
{ pkgs, ... }: {
programs = {
tmux = {
enable = true;
keyMode = "vi";
terminal = "screen-256color";
newSession = true;
historyLimit = 30000;
plugins = with pkgs.tmuxPlugins; [
dracula
];
extraConfig = ''
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"
set -g mouse on
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
'';
};
};
}

View file

@ -253,11 +253,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1697611555, "lastModified": 1697622055,
"narHash": "sha256-8nYMduRQfGSQJr2cDMyodsuGlRcJAy0Ko8K4KkjurP8=", "narHash": "sha256-t9rwzjlfgCnXDFGH3wsooYfAOA+XqQmgTojhzuNafZ4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "05649393ac1f34980a5cf6a6e89de77626c9182b", "rev": "84fa81c7acb018c3c5a504dcefbc28a182c933c2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -601,11 +601,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1697637981, "lastModified": 1697646416,
"narHash": "sha256-BReinxzdLksrjXkCZWqHZSEKd4/vWuNwgzmfjKprRxo=", "narHash": "sha256-rWB2uADZlVbKlh+RN54+zo2A3P1iBi/FSxRDUtNbSwI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "bc8feb3239c1a4a896fd03ada155d1b8ee8ae38c", "rev": "32ef23c823f865d09b34076f2b133ce45464a66b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -621,11 +621,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1697475950, "lastModified": 1697649321,
"narHash": "sha256-h5mx54JdCbmrmfqaKYIQBZlqLOgIpIWclPpue4ufHJk=", "narHash": "sha256-GQqnHejmSR+GzM89Pggdo49RAwjb+SqUYSSECIcsCiE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nurl", "repo": "nurl",
"rev": "1cf9fad61dbcc1f40bb8621b0e3ba3dd0289ec58", "rev": "f69f5601fa0bf459255be66b7c0e310fb3c33abb",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -28,8 +28,6 @@
"libvirtd" "libvirtd"
]; ];
}; };
# TODO: use hm for tmux
home-manager.users = { home-manager.users = {
matt = { matt = {

View file

@ -31,8 +31,6 @@
"libvirtd" "libvirtd"
]; ];
}; };
# TODO: use hm for tmux
home-manager.users = { home-manager.users = {
matt = { matt = {
imports = [ imports = [