{ inputs, ... }: { flake.modules.nixos.terminal = { pkgs, ... }: { environment.systemPackages = with pkgs; [ tmux tmuxinator ]; home-manager.sharedModules = [ inputs.self.modules.homeManager.terminal ]; }; flake.modules.darwin.terminal = { pkgs, ... }: { environment.systemPackages = with pkgs; [ tmux tmuxinator ]; home-manager.sharedModules = [ inputs.self.modules.homeManager.terminal ]; }; flake.modules.homeManager.terminal = { pkgs, config, lib, ... }: { programs.ghostty = { enable = true; package = if pkgs.stdenv.isDarwin then null else pkgs.ghostty; enableFishIntegration = true; settings = { font-size = if pkgs.stdenv.isDarwin then 17 else 14; font-family = "VictorMono Nerd Font"; font-style = "SemiBold"; background-opacity = 0.945; macos-titlebar-style = "transparent"; window-decoration = if pkgs.stdenv.isDarwin then "auto" else "none"; window-padding-x = 4; window-padding-y = 4; window-padding-balance = true; window-inherit-working-directory = true; window-theme = "ghostty"; shell-integration-features = true; scrollback-limit = 100000; link-url = true; link-previews = true; title = " "; background = "#0f0b15"; foreground = "#ffffff"; cursor-color = "#d369af"; selection-foreground = "#af85ea"; selection-background = "#572454"; palette = [ "0=#0f0b15" "1=#f47359" "2=#29a444" "3=#b58a52" "4=#3f95f6" "5=#d369af" "6=#4fbaef" "7=#b8c6d5" "8=#807c9f" "9=#ff6a7a" "10=#00a392" "11=#df9080" "12=#029fff" "13=#af85ea" "14=#35afbf" "15=#ffffff" ]; keybind = [ "ctrl+plus=increase_font_size:2" "ctrl+minus=decrease_font_size:2" "ctrl+0=reset_font_size" "ctrl+shift+a=select_all" "ctrl+shift+c=copy_to_clipboard" "ctrl+shift+v=paste_from_clipboard" "cmd+c=copy_to_clipboard" "cmd+v=paste_from_clipboard" ]; }; }; programs.tmux = { enable = true; package = pkgs.tmux; baseIndex = 1; clock24 = true; disableConfirmationPrompt = true; mouse = true; newSession = true; prefix = "C-b"; shell = "${pkgs.fish}/bin/fish"; terminal = "screen-256color"; keyMode = "vi"; escapeTime = 0; plugins = with pkgs; [ { plugin = tmuxPlugins.resurrect; extraConfig = '' set -g @resurrect-strategy-nvim 'session' set -g @resurrect-capture-pane-contents 'on' ''; } { plugin = tmuxPlugins.continuum; extraConfig = '' set -g @continuum-restore 'on' set -g @continuum-boot 'on' set -g @continuum-save-interval '10' ''; } ]; extraConfig = '' set -g status-position top set -g status-style bg=#1d202f,fg=white set -g status-left "" set -g status-right "#[bg=default,fg=magenta]>> #S << #[bg=default,fg=white]#H " set-window-option -g window-status-style 'fg=magenta,bg=#1d202f' set-window-option -g window-status-format ' #I #[fg=white]#W #[fg=cyan]#F ' set-window-option -g window-status-current-style "fg=black,bg=magenta" set-window-option -g window-status-current-format " #I #W #F " set -g pane-border-style fg=#807c9f set -g pane-active-border-style fg=magenta set -g message-style "fg=black,bg=red,bold" unbind % bind "|" split-window -h unbind '"' bind - split-window -l 15 -v bind r source-file "~/.config/tmux/tmux.conf" bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R bind -r H resize-pane -L 5 bind -r J resize-pane -D 5 bind -r K resize-pane -U 5 bind -r L resize-pane -R 5 bind ? list-keys -a unbind s bind s display-popup -h 50% -w 80% -E sessionizer unbind g bind g display-popup -h 90% -w 95% -E lazygit unbind C-x bind C-x kill-session unbind v bind v choose-tree -Zw "join-pane -t '%%'" ''; }; xdg.configFile."tmuxinator" = { source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/terminal/tmuxinator-layouts"; }; }; }