From 5404595b55eeefae69f2952a34dfc70e32523060 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Fri, 27 May 2016 15:57:12 +0800 Subject: [PATCH] tmux module: set TMUX_TMPDIR via environment instead of wrapper --- nixos/modules/programs/tmux.nix | 7 ++++++- pkgs/tools/misc/tmux/default.nix | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) 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 = {