Merge pull request #222515 from codedownio/tmux-run-plugins-last

This commit is contained in:
Franz Pletz 2023-08-26 22:47:33 +02:00 committed by GitHub
commit da9db25ca4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,6 +52,8 @@ let
set -s escape-time ${toString cfg.escapeTime} set -s escape-time ${toString cfg.escapeTime}
set -g history-limit ${toString cfg.historyLimit} set -g history-limit ${toString cfg.historyLimit}
${cfg.extraConfigBeforePlugins}
${lib.optionalString (cfg.plugins != []) '' ${lib.optionalString (cfg.plugins != []) ''
# Run plugins # Run plugins
${lib.concatMapStringsSep "\n" (x: "run-shell ${x.rtp}") cfg.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."; 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 { extraConfig = mkOption {
default = ""; default = "";
description = lib.mdDoc '' description = lib.mdDoc ''
Additional contents of /etc/tmux.conf Additional contents of /etc/tmux.conf, to be run after sourcing plugins.
''; '';
type = types.lines; type = types.lines;
}; };