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"; + } + ]; + }; + }; +}