Hi, I am trying to configure Tmux using Home Manager on Ubuntu, and Tmux is acting very strangely. It loads some parts of my config, such as my prefix, but not my theme and plugins. I’ve tried changing the order to no avail. Not sure if I need to somehow use Tmux Plugin Manager but I have no idea what’s going on. I’ve tried rebuilding home manager, then killing the Tmux server, then restarting but still getting the same results.
{
pkgs,
config,
...
}: let
tmux-nerd-font-window-name = pkgs.tmuxPlugins.mkTmuxPlugin {
pluginName = "tmux-nerd-font-window-name.tmux";
version = "unstable-2023-08-22";
rtpFilePath = "tmux-nerd-font-window-name.tmux";
src = pkgs.fetchFromGitHub {
owner = "joshmedeski";
repo = "tmux-nerd-font-window-name";
rev = "c2e62d394a290a32e1394a694581791b0e344f9a";
sha256 = "stkhp95iLNxPy74Lo2SNes5j1AA4q/rgl+eLiZS81uA=";
};
};
in {
programs.tmux = {
enable = true;
terminal = "tmux-256color";
baseIndex = 1;
prefix = "C-x";
plugins = with pkgs.tmuxPlugins; [
nord
vim-tmux-navigator
tmux-which-key
{
plugin = resurrect;
extraConfig = ''
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-capture-pane-contents 'on'
'';
}
{
plugin = continuum;
extraConfig = ''
set -g @continuum-restore 'on'
set -g @continuum-save-interval '5'
set -g @continuum-boot 'on'
'';
}
{
plugin = tmux-nerd-font-window-name;
extraConfig = ''
set -g @plugin 'joshmedeski/tmux-nerd-font-window-name'
'';
}
];
extraConfig = ''
##### Colors & Terminal #####
set -ga terminal-overrides ",xterm-256color:Tc"
set -as terminal-features ",xterm-256color:RGB"
##### General #####
set -g set-clipboard on
set -g detach-on-destroy off
set -g escape-time 0
set -g history-limit 1000000
set -g mouse on
set -g status-interval 3
set -g allow-passthrough on
set -g status-position top
##### Window / Pane Management #####
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
unbind %
bind | split-window -h -c "#{pane_current_path}"
unbind '"'
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
##### Resize / Navigation #####
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r h resize-pane -L 5
bind -r l resize-pane -R 5
bind -r m resize-pane -Z
setw -g mode-keys vi
##### which-key #####
set -g @tmux-which-key-xdg-enable 1
set -g @tmux-which-key-disable-autobuild 1
##### Reload #####
bind r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded!"
##### Theme #####
run-shell ${pkgs.tmuxPlugins.nord}/share/tmux-plugins/nord/nord.tmux
'';
};
}
You’r config looks fine to me at a first glance. Can you provide some more information about your setup? What ubuntu version, what shell, …? Also, what does actually end up in the tmux config? have you checked the actual content of ~/.config/tmuc.conf?
Ubuntu 25.04, ZSH, and Nix installed using Determinate Nix. I also have ~/.nix-profile/bin on path if that makes a difference.
The generated tmux config doesn’t seem to have anything out of the ordinary from my config to my knowledge, so I’m not sure what else could be going wrong. I’ve attached it below.
Once I source the config inside tmux, everything but the theme works. In regard to that, I looked at tmux messages using tmux-which-key and it mentions lack of a nord.conf file, even though it should be there. My config exists in ~/nix-config but I have no src directory there.
set -g default-terminal "tmux-256color"
set -g base-index 1
setw -g pane-base-index 1
set -g status-keys emacs
set -g mode-keys emacs
# rebind main key: C-x
unbind C-b
set -g prefix C-x
bind -N "Send the prefix key through to the application" \
C-x send-prefix
set -g mouse off
set -g focus-events off
setw -g aggressive-resize off
setw -g clock-mode-style 12
set -s escape-time 500
set -g history-limit 2000
# ============================================= #
# Load plugins with Home Manager #
# --------------------------------------------- #
# tmuxplugin-nord
# ---------------------
run-shell /nix/store/4i7lx1lhya4vwmkla666wwj9xdz41cyn-tmuxplugin-nord-0.3.0-unstable-2023-03-03/share/tmux-plugins/nord/nord.tmux
# tmuxplugin-vim-tmux-navigator
# ---------------------
run-shell /nix/store/rypi573yvrlza1sjsm9ya24784jbzrlq-tmuxplugin-vim-tmux-navigator-unstable-2022-08-21/share/tmux-plugins/vim-tmux-navigator/vim-tmux-navigator.tmux
# tmuxplugin-tmux-which-key
# ---------------------
run-shell /nix/store/qxhkv8042kd8scrpnmmfjxinxh0kn07j-tmuxplugin-tmux-which-key-0-unstable-2024-06-08/share/tmux-plugins/tmux-which-key/plugin.sh.tmux
# tmuxplugin-resurrect
# ---------------------
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-capture-pane-contents 'on'
run-shell /nix/store/9ll73l6sy1wa7i6xg48fwn4wwdbvc8il-tmuxplugin-resurrect-unstable-2022-05-01/share/tmux-plugins/resurrect/resurrect.tmux
# tmuxplugin-continuum
# ---------------------
set -g @continuum-restore 'on'
set -g @continuum-save-interval '5'
set -g @continuum-boot 'on'
set -g @continuum-systemd-start-cmd 'new-session -d'
run-shell /nix/store/pri2dyflycm30zampdayc3y9xsrk3qdk-tmuxplugin-continuum-unstable-2022-01-25/share/tmux-plugins/continuum/continuum.tmux
# tmuxplugin-tmux-nerd-font-window-name.tmux
# ---------------------
set -g @plugin 'joshmedeski/tmux-nerd-font-window-name'
run-shell /nix/store/ws7w1ir2mg5p7f2c32q9p2fmgjknmxp3-tmuxplugin-tmux-nerd-font-window-name.tmux-unstable-2023-08-22/share/tmux-plugins/tmux-nerd-font-window-name.tmux/tmux-nerd-font-window-name.tmux
# ============================================= #
##### Colors & Terminal #####
set -ga terminal-overrides ",xterm-256color:Tc"
set -as terminal-features ",xterm-256color:RGB"
##### General #####
set -g set-clipboard on
set -g detach-on-destroy off
set -g escape-time 0
set -g history-limit 1000000
set -g mouse on
set -g status-interval 3
set -g allow-passthrough on
set -g status-position top
##### Window / Pane Management #####
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
unbind %
bind | split-window -h -c "#{pane_current_path}"
unbind '"'
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
##### Resize / Navigation #####
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r h resize-pane -L 5
bind -r l resize-pane -R 5
bind -r m resize-pane -Z
setw -g mode-keys vi
##### which-key #####
set -g @tmux-which-key-xdg-enable 1
set -g @tmux-which-key-disable-autobuild 1
##### Reload #####
bind r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded!"
Tried that and basically got the same results, the status bar is just the regular Tmux one. I checked to make sure I didn’t have a tmux config at ~/.tmux.conf as well, no dice.
Yeah sorry, I meant your tmux home-manager module.
Just looking at your config again, it seems to be wanting to load a conf file from your config dir, which is not present. Are you sure, you are not loading a conf file somewhere else in your configuration? maybe do a ripgrep and check. The conf file should be in the nix-store, and not in your config folder, unless you specify it explicitly:
Your terminal output says this:
...
message: /home/blckhrt/nix-config/src/nord-status-content.conf: No such file or directory
...
Yeah, I checked with ripgrep for “.conf” and “nord”, no results came up in my tmux config for those other than ones in nonrelated files. I do not have an src dir in my config. Another bit of setup context, I use a makefile to run home-manager switch.