{ userName, pkgs, lib, ... }: { home-manager.users.${userName} = { config, ... }: { programs.tmux = { enable = true; clock24 = true; historyLimit = 50000; mouse = true; extraConfig = lib.readFile (pkgs.stdenv.mkDerivation { name = "tmux.conf"; src = ./tmux.conf; buildInputs = with pkgs; [ makeWrapper ]; phases = [ "installPhase" ]; installPhase = '' substitute $src $out \ --subst-var-by zsh ${config.programs.zsh.package} \ --subst-var-by man ${config.programs.man.package} ''; }); }; home.packages = [ pkgs.tmuxp ]; }; }