From 39a21f102f7ab8e0e55619168c04dd1315162db9 Mon Sep 17 00:00:00 2001 From: skyler-oakeson Date: Wed, 21 Jan 2026 23:09:08 -0700 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 0000000..7f840be --- /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 0000000..4ff8922 --- /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"; + } + ]; + }; + }; +}