nixos/tmux: add package option (#372994)

Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
This commit is contained in:
Phani Rithvij 2025-01-12 05:52:59 +05:30 committed by GitHub
parent 9eb2e11b4d
commit e5b47e167a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,6 +8,7 @@
let let
inherit (lib) inherit (lib)
mkOption mkOption
mkPackageOption
mkIf mkIf
types types
optionalString optionalString
@ -87,6 +88,8 @@ in
relatedPackages = [ "tmux" ]; relatedPackages = [ "tmux" ];
}; };
package = mkPackageOption pkgs "tmux" { };
aggressiveResize = mkOption { aggressiveResize = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
@ -224,7 +227,7 @@ in
environment = { environment = {
etc."tmux.conf".text = tmuxConf; etc."tmux.conf".text = tmuxConf;
systemPackages = [ pkgs.tmux ] ++ cfg.plugins; systemPackages = [ cfg.package ] ++ cfg.plugins;
variables = { variables = {
TMUX_TMPDIR = lib.optional cfg.secureSocket ''''${XDG_RUNTIME_DIR:-"/run/user/$(id -u)"}''; TMUX_TMPDIR = lib.optional cfg.secureSocket ''''${XDG_RUNTIME_DIR:-"/run/user/$(id -u)"}'';