summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-05-29 19:42:44 +0200
committerlassulus <lassulus@lassul.us>2022-05-29 19:42:44 +0200
commitadf9339f39a6b7700d24f51fca1c65fef37761bd (patch)
treefdfd3a6c3995cf582249b5e6dc033b8be6ccffcc
parente47f1e635ce255eaef8674f13aeb94f071bbb050 (diff)
l tmux: init
-rw-r--r--lass/2configs/default.nix1
-rw-r--r--lass/2configs/tmux.nix29
2 files changed, 16 insertions, 14 deletions
diff --git a/lass/2configs/default.nix b/lass/2configs/default.nix
index 01a40952..0fa34013 100644
--- a/lass/2configs/default.nix
+++ b/lass/2configs/default.nix
@@ -10,6 +10,7 @@ with import <stockholm/lib>;
./htop.nix
<stockholm/krebs/2configs/security-workarounds.nix>
./wiregrill.nix
+ ./tmux.nix
./tor-ssh.nix
{
users.extraUsers =
diff --git a/lass/2configs/tmux.nix b/lass/2configs/tmux.nix
index c977a110..10931365 100644
--- a/lass/2configs/tmux.nix
+++ b/lass/2configs/tmux.nix
@@ -2,25 +2,26 @@ with import <stockholm/lib>;
{ config, pkgs, ... }:
{
+ environment.etc."tmux.conf".text = ''
+ #prefix key to `
+ set-option -g prefix2 `
+
+ bind-key r source-file /etc/tmux.conf \; display-message "/etc/tmux.conf reloaded"
+
+ set-option -g default-terminal screen-256color
+
+ #use session instead of windows
+ bind-key c new-session
+ bind-key p switch-client -p
+ bind-key n switch-client -n
+ 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 ${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
-
- #use session instead of windows
- bind-key c new-session
- bind-key p switch-client -p
- bind-key n switch-client -n
- bind-key C-s switch-client -l
- ''} "$@"
+ exec ${super.tmux}/bin/tmux -f /etc/tmux.conf "$@"
'')
super.tmux
];