From 39a21f102f7ab8e0e55619168c04dd1315162db9 Mon Sep 17 00:00:00 2001 From: skyler-oakeson Date: Wed, 21 Jan 2026 23:09:08 -0700 Subject: [PATCH 1/3] modules/tmux: init --- modules/tmux/check.nix | 18 ++++++++++++++++++ modules/tmux/module.nix | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 modules/tmux/check.nix create mode 100644 modules/tmux/module.nix diff --git a/modules/tmux/check.nix b/modules/tmux/check.nix new file mode 100644 index 00000000..7f840be3 --- /dev/null +++ b/modules/tmux/check.nix @@ -0,0 +1,18 @@ +{ + pkgs, + self, +}: + +let + tmuxWrapped = + (self.wrapperModules.tmux.apply { + inherit pkgs; + "tmux.conf".content = '' + set -g status-justify absolute-centre + ''; + }).wrapper; +in +pkgs.runCommand "tmux-test" { } '' + "${tmuxWrapped}/bin/tmux" display-message -p '#{config_files}' | grep -q 'tmux.conf' + touch $out +'' diff --git a/modules/tmux/module.nix b/modules/tmux/module.nix new file mode 100644 index 00000000..4ff89220 --- /dev/null +++ b/modules/tmux/module.nix @@ -0,0 +1,34 @@ +{ + config, + wlib, + lib, + ... +}: +{ + _class = "wrapper"; + options = { + "tmux.conf" = lib.mkOption { + type = wlib.types.file config.pkgs; + description = '' + Configuration file for tmux + See + ''; + }; + }; + + config = { + package = config.pkgs.tmux; + flags = { + "-f" = toString config."tmux.conf".path; + }; + + meta = { + maintainers = [ + { + name = "Skyler Oakeson"; + github = "skyler-oakeson"; + } + ]; + }; + }; +} From d46081ccce6c36632bdf2f0e138f6db8c81ac7a2 Mon Sep 17 00:00:00 2001 From: skyler-oakeson Date: Wed, 27 May 2026 14:47:52 -0600 Subject: [PATCH 2/3] fixed broken check --- modules/tmux/check.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tmux/check.nix b/modules/tmux/check.nix index 7f840be3..f1ce3e9a 100644 --- a/modules/tmux/check.nix +++ b/modules/tmux/check.nix @@ -13,6 +13,6 @@ let }).wrapper; in pkgs.runCommand "tmux-test" { } '' - "${tmuxWrapped}/bin/tmux" display-message -p '#{config_files}' | grep -q 'tmux.conf' + "${tmuxWrapped}/bin/tmux" -V | grep -q "${tmuxWrapped.version}" touch $out '' From 0440dd74e26796831ede64ffe2001872dcb56d5e Mon Sep 17 00:00:00 2001 From: skyler-oakeson Date: Wed, 21 Jan 2026 23:09:08 -0700 Subject: [PATCH 3/3] modules/tmux: init --- modules/tmux/check.nix | 18 ++++++++++++++++++ modules/tmux/module.nix | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 modules/tmux/check.nix create mode 100644 modules/tmux/module.nix diff --git a/modules/tmux/check.nix b/modules/tmux/check.nix new file mode 100644 index 00000000..f1ce3e9a --- /dev/null +++ b/modules/tmux/check.nix @@ -0,0 +1,18 @@ +{ + pkgs, + self, +}: + +let + tmuxWrapped = + (self.wrapperModules.tmux.apply { + inherit pkgs; + "tmux.conf".content = '' + set -g status-justify absolute-centre + ''; + }).wrapper; +in +pkgs.runCommand "tmux-test" { } '' + "${tmuxWrapped}/bin/tmux" -V | grep -q "${tmuxWrapped.version}" + touch $out +'' diff --git a/modules/tmux/module.nix b/modules/tmux/module.nix new file mode 100644 index 00000000..4ff89220 --- /dev/null +++ b/modules/tmux/module.nix @@ -0,0 +1,34 @@ +{ + config, + wlib, + lib, + ... +}: +{ + _class = "wrapper"; + options = { + "tmux.conf" = lib.mkOption { + type = wlib.types.file config.pkgs; + description = '' + Configuration file for tmux + See + ''; + }; + }; + + config = { + package = config.pkgs.tmux; + flags = { + "-f" = toString config."tmux.conf".path; + }; + + meta = { + maintainers = [ + { + name = "Skyler Oakeson"; + github = "skyler-oakeson"; + } + ]; + }; + }; +}