l tmux: init

This commit is contained in:
lassulus 2022-05-29 19:42:44 +02:00
parent e47f1e635c
commit adf9339f39
2 changed files with 16 additions and 14 deletions

View file

@ -10,6 +10,7 @@ with import <stockholm/lib>;
./htop.nix ./htop.nix
<stockholm/krebs/2configs/security-workarounds.nix> <stockholm/krebs/2configs/security-workarounds.nix>
./wiregrill.nix ./wiregrill.nix
./tmux.nix
./tor-ssh.nix ./tor-ssh.nix
{ {
users.extraUsers = users.extraUsers =

View file

@ -2,16 +2,11 @@ with import <stockholm/lib>;
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
nixpkgs.config.packageOverrides = super: { environment.etc."tmux.conf".text = ''
tmux = pkgs.symlinkJoin { #prefix key to `
name = "tmux"; set-option -g prefix2 `
paths = [
(pkgs.writeDashBin "tmux" '' bind-key r source-file /etc/tmux.conf \; display-message "/etc/tmux.conf reloaded"
exec ${super.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" ''
#change prefix key to `
set-option -g prefix `
unbind-key C-b
bind ` send-prefix
set-option -g default-terminal screen-256color set-option -g default-terminal screen-256color
@ -20,7 +15,13 @@ with import <stockholm/lib>;
bind-key p switch-client -p bind-key p switch-client -p
bind-key n switch-client -n bind-key n switch-client -n
bind-key C-s switch-client -l bind-key C-s switch-client -l
''} "$@" '';
nixpkgs.config.packageOverrides = super: {
tmux = pkgs.symlinkJoin {
name = "tmux";
paths = [
(pkgs.writeDashBin "tmux" ''
exec ${super.tmux}/bin/tmux -f /etc/tmux.conf "$@"
'') '')
super.tmux super.tmux
]; ];