From 15f39fe77e0bc12c71e043fefc834205edc13436 Mon Sep 17 00:00:00 2001 From: Mahyar Mirrashed Date: Tue, 18 Feb 2025 00:56:54 -0600 Subject: [PATCH] tmux: add option to put configurations before plugins --- modules/programs/tmux.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/modules/programs/tmux.nix b/modules/programs/tmux.nix index 85052c9fd..9a4a44417 100644 --- a/modules/programs/tmux.nix +++ b/modules/programs/tmux.nix @@ -183,13 +183,20 @@ in { ''; }; - extraConfig = mkOption { - type = types.lines; + extraConfigBeforePlugins = mkOption { default = ""; description = '' - Additional configuration to add to - {file}`tmux.conf`. + Additional contents of /etc/tmux.conf, to be run before sourcing plugins. ''; + type = types.lines; + }; + + extraConfig = mkOption { + default = ""; + description = '' + Additional contents of /etc/tmux.conf, to be run after sourcing plugins. + ''; + type = types.lines; }; focusEvents = mkOption { @@ -342,6 +349,10 @@ in { } { xdg.configFile."tmux/tmux.conf".text = mkBefore tmuxConf; } + { + xdg.configFile."tmux/tmux.conf".text = + mkAfter cfg.extraConfigBeforePlugins; + } { xdg.configFile."tmux/tmux.conf".text = mkAfter cfg.extraConfig; } (mkIf cfg.secureSocket {