From 7c6f8fa0165d1c869dc64c7e39f8e4db6cb02cbf Mon Sep 17 00:00:00 2001 From: skyler-oakeson Date: Wed, 24 Jun 2026 20:52:55 -0600 Subject: [PATCH] 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"; + } + ]; + }; + }; +}