From 090889f3240ffc5190d94e3c74dd2c19b9b71a38 Mon Sep 17 00:00:00 2001 From: Artem Sheremet Date: Wed, 29 Apr 2026 17:12:08 +0200 Subject: [PATCH] Move to iTerm2 Mostly for tmux integration --- modules/home/mac-portable.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/modules/home/mac-portable.nix b/modules/home/mac-portable.nix index f46df97..ec870f9 100644 --- a/modules/home/mac-portable.nix +++ b/modules/home/mac-portable.nix @@ -9,8 +9,41 @@ home.packages = with pkgs; [ secretive vlc-bin + + # Faster and more feature-rich than Terminal. + iterm2 ]; + targets.darwin.defaults."com.googlecode.iterm2" = { + # $ defaults read ~/Library/Preferences/com.googlecode.iterm2.plist + + # Allow tmux (and others) to use OSC 52 to set clipboard. + AllowClipboardAccess = true; + # Allow programs to clear scrollback. + PreventEscapeSequenceFromClearingHistory = false; + + TripleClickSelectsFullWrappedLines = true; + WordChars = "/-._~"; + PromptOnQuit = false; + }; + home.file."Library/Application Support/iTerm2/DynamicProfiles/nix-profile.json".text = + builtins.toJSON + { + Profiles = [ + { + Name = "Nix-Managed"; + Guid = "17DF2CCB-C7CD-4BCC-AC28-666DD6C8AF4A"; + "Normal Font" = "Menlo-Regular 13"; + + Columns = 160; + Rows = 45; + + # For tmux selection and moving borders. + "Mouse Reporting" = true; + } + ]; + }; + programs.zsh.envExtra = '' # If Secretive doesn't recognize your Yubikey PIV, it's possible you # generated it using yubikey-agent and that did not update CHUID. Simply