From 2429fdcd672c0958514a85bf024d45af7cb93b92 Mon Sep 17 00:00:00 2001 From: vdbe <44153531+vdbe@users.noreply.github.com> Date: Mon, 13 May 2024 17:59:12 +0000 Subject: [PATCH] feat(home-manager): add `extraConfig` option for tmux (#137) Add the option extraConfig this allows users to configure the plugin Co-authored-by: seth --- modules/home-manager/tmux.nix | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/modules/home-manager/tmux.nix b/modules/home-manager/tmux.nix index 4cdd2cc..f960fc2 100644 --- a/modules/home-manager/tmux.nix +++ b/modules/home-manager/tmux.nix @@ -5,6 +5,7 @@ , ... }: let + inherit (lib) ctp mkOption types concatStrings; cfg = config.programs.tmux.catppuccin; enable = cfg.enable && config.programs.tmux.enable; @@ -18,12 +19,27 @@ let in { options.programs.tmux.catppuccin = - lib.ctp.mkCatppuccinOpt "tmux"; + ctp.mkCatppuccinOpt "tmux" + // { + extraConfig = mkOption { + type = types.lines; + description = "Additional configuration for the catppuccin plugin."; + default = ""; + example = '' + set -g @catppuccin_status_modules_right "application session user host date_time" + ''; + }; + }; config.programs.tmux.plugins = lib.mkIf enable [ { inherit plugin; - extraConfig = "set -g @catppuccin_flavour '${cfg.flavour}'"; + extraConfig = concatStrings [ + '' + set -g @catppuccin_flavour '${cfg.flavour}' + '' + cfg.extraConfig + ]; } ]; }