Skip to content

Commit

Permalink
feat(tmux): add support for extraConfig
Browse files Browse the repository at this point in the history
Add the option extraConfig this allows users to configure the plugin
  • Loading branch information
vdbe committed Apr 21, 2024
1 parent 29bd8a3 commit 6cc42c9
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions modules/home-manager/tmux.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
, ...
}:
let
inherit (lib) ctp mkOption types concatStrings;
cfg = config.programs.tmux.catppuccin;
enable = cfg.enable && config.programs.tmux.enable;

Expand All @@ -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
];
}
];
}

0 comments on commit 6cc42c9

Please sign in to comment.