Notes
This article was translated by GPT-5.2-Codex. The original is here.
Introduction
After updating the flake.lock file with Nix, tmux's default shell became sh, so I’m writing down the fix.
tmux 3.5a
There is an issue in home-manager, so if you want primary sources, see the link below.
When tmux in nixpkgs was updated to 3.5a, /bin/sh started being used for new panes (CHANGELOG).
Workaround
I don’t know how to change the default shell in tmux 3.5a, so for now I fixed it by pinning tmux to 3.5 as below.
1{ pkgs, ... }:23{4programs.tmux = {5enable = true;6# see: https://github.com/nix-community/home-manager/issues/59527package = pkgs.tmux.overrideAttrs (old: rec {8version = "3.5";9src = pkgs.fetchFromGitHub {10owner = "tmux";11repo = "tmux";12rev = version;13hash = "sha256-8CRZj7UyBhuB5QO27Y+tHG62S/eGxPOHWrwvh1aBqq0=";14};15});16};17}
This pins tmux's version under Nix. It is nice that with Nix you can easily roll back or pin versions, and it’s easy to reproduce across environments.
I’ll update the article if I find another solution besides pinning. I hope this is fixed before 3.6.