From addfb000c4f2ae2643886c7c3206b7b06fdad850 Mon Sep 17 00:00:00 2001 From: Tom McLaughlin Date: Wed, 22 Mar 2023 02:07:15 -0700 Subject: [PATCH] tmux: add extraConfigBeforePlugins --- nixos/modules/programs/tmux.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nixos/modules/programs/tmux.nix b/nixos/modules/programs/tmux.nix index 4f452f1d7f9b..0d1c7c9cdf0f 100644 --- a/nixos/modules/programs/tmux.nix +++ b/nixos/modules/programs/tmux.nix @@ -52,6 +52,8 @@ let set -s escape-time ${toString cfg.escapeTime} set -g history-limit ${toString cfg.historyLimit} + ${cfg.extraConfigBeforePlugins} + ${lib.optionalString (cfg.plugins != []) '' # Run plugins ${lib.concatMapStringsSep "\n" (x: "run-shell ${x.rtp}") cfg.plugins} @@ -108,10 +110,18 @@ in { description = lib.mdDoc "Time in milliseconds for which tmux waits after an escape is input."; }; + extraConfigBeforePlugins = mkOption { + default = ""; + description = lib.mdDoc '' + Additional contents of /etc/tmux.conf, to be run before sourcing plugins. + ''; + type = types.lines; + }; + extraConfig = mkOption { default = ""; description = lib.mdDoc '' - Additional contents of /etc/tmux.conf + Additional contents of /etc/tmux.conf, to be run after sourcing plugins. ''; type = types.lines; };