diff --git a/nixos/modules/programs/tmux.nix b/nixos/modules/programs/tmux.nix index 2fc1ed63cb36..cadf8d4ae105 100644 --- a/nixos/modules/programs/tmux.nix +++ b/nixos/modules/programs/tmux.nix @@ -156,8 +156,13 @@ in { config = mkIf cfg.enable { environment = { - systemPackages = [ pkgs.tmux ]; etc."tmux.conf".text = tmuxConf; + + systemPackages = [ pkgs.tmux ]; + + variables = { + TMUX_TMPDIR = ''''${XDG_RUNTIME_DIR:-"/run/user/\$(id -u)"}''; + }; }; }; } diff --git a/pkgs/tools/misc/tmux/default.nix b/pkgs/tools/misc/tmux/default.nix index 4f8a5c05b182..ad15fa98a4b3 100644 --- a/pkgs/tools/misc/tmux/default.nix +++ b/pkgs/tools/misc/tmux/default.nix @@ -34,9 +34,6 @@ stdenv.mkDerivation rec { postInstall = '' mkdir -p $out/share/bash-completion/completions cp -v ${bashCompletion}/completions/tmux $out/share/bash-completion/completions/tmux - - wrapProgram $out/bin/tmux \ - --set TMUX_TMPDIR \''${XDG_RUNTIME_DIR:-"/run/user/\$(id -u)"} ''; meta = {