From b3ddb68f2bba62707544568904a165bc1d100863 Mon Sep 17 00:00:00 2001 From: cy Date: Fri, 13 Dec 2024 23:53:01 -0500 Subject: [PATCH] configure tmux with home manager and create common home --- nix/home/yt/chunk.nix | 2 +- nix/home/yt/common.nix | 6 ++++++ nix/home/yt/tmux.nix | 36 ++++++++++++++++++++++++++++++++++++ nix/home/yt/ytnix.nix | 3 +-- nix/home/yt/zsh/default.nix | 3 --- nix/hosts/common.nix | 2 +- 6 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 nix/home/yt/common.nix create mode 100644 nix/home/yt/tmux.nix diff --git a/nix/home/yt/chunk.nix b/nix/home/yt/chunk.nix index b4c2863..6faaeb8 100644 --- a/nix/home/yt/chunk.nix +++ b/nix/home/yt/chunk.nix @@ -7,7 +7,7 @@ ... }: { imports = [ - ./zsh + ./common.nix ]; home = { username = "yt"; diff --git a/nix/home/yt/common.nix b/nix/home/yt/common.nix new file mode 100644 index 0000000..905dedc --- /dev/null +++ b/nix/home/yt/common.nix @@ -0,0 +1,6 @@ +{...}: { + imports = [ + ./tmux.nix + ./zsh + ]; +} diff --git a/nix/home/yt/tmux.nix b/nix/home/yt/tmux.nix new file mode 100644 index 0000000..aaf53e8 --- /dev/null +++ b/nix/home/yt/tmux.nix @@ -0,0 +1,36 @@ +{ + pkgs, + ... +}: { + programs.tmux = { + enable = true; + baseIndex = 1; + historyLimit = 50000; + keyMode = "emacs"; + mouse = false; + plugins = with pkgs.tmuxPlugins; [ + yank + tokyo-night-tmux + { + plugin = resurrect; + extraConfig = "set -g @resurrect-capture-pane-contents 'on'"; + } + { + plugin = continuum; + extraConfig = "set -g @continnum-restore 'on'"; + } + ]; + prefix = "C-f"; + sensibleOnTop = true; + terminal = "tmux-256color"; + extraConfig = '' + bind h select-pane -L + bind j select-pane -D + bind k select-pane -U + bind l select-pane -R + bind u attach-session -c "#{pane_current_path}" + bind v split-window -c "#{pane_current_path}" -h + bind s split-window -c "#{pane_current_path}" -v + ''; + }; +} diff --git a/nix/home/yt/ytnix.nix b/nix/home/yt/ytnix.nix index f69a003..aba9a8c 100644 --- a/nix/home/yt/ytnix.nix +++ b/nix/home/yt/ytnix.nix @@ -7,7 +7,7 @@ ... }: { imports = [ - ./zsh + ./common.nix ]; home = { username = "yt"; @@ -64,7 +64,6 @@ aerc delta fzf - zoxide eza fastfetch discord diff --git a/nix/home/yt/zsh/default.nix b/nix/home/yt/zsh/default.nix index ed77b56..b096761 100644 --- a/nix/home/yt/zsh/default.nix +++ b/nix/home/yt/zsh/default.nix @@ -1,7 +1,4 @@ { - config, - lib, - inputs, ... }: { programs.zsh = { diff --git a/nix/hosts/common.nix b/nix/hosts/common.nix index 7ffead1..5b6a615 100644 --- a/nix/hosts/common.nix +++ b/nix/hosts/common.nix @@ -1,4 +1,4 @@ -{lib,config,pkgs, ...}: { +{...}: { nix = { settings = { experimental-features = "nix-command flakes";