feat(home-manager): add extraConfig option for tmux (#137)

Add the option extraConfig this allows users to configure the plugin

Co-authored-by: seth <getchoo@tuta.io>
This commit is contained in:
vdbe 2024-05-13 17:59:12 +00:00 committed by GitHub
parent 29aa551d4a
commit 2429fdcd67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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