From 19fdbdddcd2dd0a43164dc50c0c0b840b2f8ae5c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 19 Nov 2023 10:52:14 +0900 Subject: home-manager: fill the gap between envs --- home-manager/home.nix | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'home-manager/home.nix') diff --git a/home-manager/home.nix b/home-manager/home.nix index 7da79e7..e01feea 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -4,6 +4,8 @@ let homeDirectory = specialArgs.env.homeDirectory; clipboardCopyCommand = specialArgs.env.gui.clipboard.copyCommand; requiresWlClipboard = clipboardCopyCommand == "wl-copy"; + terminalApp = specialArgs.env.gui.terminalApp; + useNixManagedZsh = specialArgs.env.useNixManagedZsh; in { home.username = username; @@ -91,7 +93,7 @@ in aggressiveResize = true; baseIndex = 1; clock24 = true; - escapeTime = 0; + escapeTime = 5; historyLimit = 50000; mouse = false; prefix = "C-t"; @@ -100,14 +102,26 @@ in extraConfig = let commonConfig = builtins.readFile ./config/tmux/tmux.conf; - extraConfig = if clipboardCopyCommand != null then - '' - bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "${clipboardCopyCommand}" - '' - else - ""; + clipboardConfig = if clipboardCopyCommand != null then + '' + bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "${clipboardCopyCommand}" + '' + else + ""; + terminalConfig = if terminalApp == "alacritty" then + '' + set-option -ga terminal-overrides ',alacritty:RGB' + '' + else + ""; + shellConfig = if useNixManagedZsh then + '' + set-option -g default-shell ${homeDirectory}/.nix-profile/bin/zsh + '' + else + ""; in - commonConfig + extraConfig; + commonConfig + clipboardConfig + terminalConfig + shellConfig; }; programs.zsh = { -- cgit v1.2.3-70-g09d2