2023-07-13 09:17:51 -07:00
|
|
|
{ config
|
|
|
|
, lib
|
2023-11-02 10:55:47 -07:00
|
|
|
, pkgs
|
|
|
|
, sources
|
2023-07-13 09:17:51 -07:00
|
|
|
, ...
|
|
|
|
}:
|
2023-04-15 17:22:31 -07:00
|
|
|
let
|
|
|
|
cfg = config.programs.tmux.catppuccin;
|
2023-07-13 09:17:51 -07:00
|
|
|
enable = cfg.enable && config.programs.tmux.enable;
|
2023-04-15 17:22:31 -07:00
|
|
|
|
2023-11-02 10:55:47 -07:00
|
|
|
plugin =
|
|
|
|
# TODO @getchoo: upstream this in nixpkgs
|
|
|
|
pkgs.tmuxPlugins.mkTmuxPlugin {
|
2023-04-15 17:22:31 -07:00
|
|
|
pluginName = "catppuccin";
|
2023-11-02 10:55:47 -07:00
|
|
|
version = builtins.substring 0 7 sources.tmux.rev;
|
|
|
|
src = sources.tmux;
|
2023-04-15 17:22:31 -07:00
|
|
|
};
|
2023-04-18 17:01:16 -07:00
|
|
|
in
|
|
|
|
{
|
2023-04-17 09:44:07 -07:00
|
|
|
options.programs.tmux.catppuccin =
|
2023-11-02 10:55:47 -07:00
|
|
|
lib.ctp.mkCatppuccinOpt "tmux";
|
2023-04-15 17:22:31 -07:00
|
|
|
|
2023-07-13 09:17:51 -07:00
|
|
|
config.programs.tmux.plugins = lib.mkIf enable [
|
2023-04-15 17:22:31 -07:00
|
|
|
{
|
|
|
|
inherit plugin;
|
|
|
|
extraConfig = "set -g @catppuccin_flavour '${cfg.flavour}'";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|