mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
tmux module: add secureSocket option
This commit is contained in:
parent
8a5f3ec6a8
commit
766ae1ecf9
@ -151,6 +151,15 @@ in {
|
||||
type = types.str;
|
||||
description = "Set the $TERM variable.";
|
||||
};
|
||||
|
||||
secureSocket = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Store tmux socket under /run, which is more secure than /tmp, but as a
|
||||
downside it doesn't survive user logout.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -163,7 +172,7 @@ in {
|
||||
systemPackages = [ pkgs.tmux ];
|
||||
|
||||
variables = {
|
||||
TMUX_TMPDIR = ''''${XDG_RUNTIME_DIR:-"/run/user/\$(id -u)"}'';
|
||||
TMUX_TMPDIR = lib.optional cfg.secureSocket ''''${XDG_RUNTIME_DIR:-"/run/user/\$(id -u)"}'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user