summary refs log tree commit diff
path: root/nixos/modules/programs/tmux.nix
diff options
context:
space:
mode:
authorPeter Hoeg <peter@speartail.com>2016-05-27 15:57:12 +0800
committerPeter Hoeg <peter@speartail.com>2016-05-27 17:29:19 +0800
commit5404595b55eeefae69f2952a34dfc70e32523060 (patch)
treedb0563c422d919da25193142802ebe11de95970a /nixos/modules/programs/tmux.nix
parente746e1ffbc8ff2283cb696ec6f0c23ce726ede87 (diff)
downloadnixlib-5404595b55eeefae69f2952a34dfc70e32523060.tar
nixlib-5404595b55eeefae69f2952a34dfc70e32523060.tar.gz
nixlib-5404595b55eeefae69f2952a34dfc70e32523060.tar.bz2
nixlib-5404595b55eeefae69f2952a34dfc70e32523060.tar.lz
nixlib-5404595b55eeefae69f2952a34dfc70e32523060.tar.xz
nixlib-5404595b55eeefae69f2952a34dfc70e32523060.tar.zst
nixlib-5404595b55eeefae69f2952a34dfc70e32523060.zip
tmux module: set TMUX_TMPDIR via environment instead of wrapper
Diffstat (limited to 'nixos/modules/programs/tmux.nix')
-rw-r--r--nixos/modules/programs/tmux.nix7
1 files changed, 6 insertions, 1 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)"}'';
+      };
     };
   };
 }