rose-pine-nix/modules/home-manager/tmux.nix

35 lines
771 B
Nix
Raw Normal View History

2024-05-21 14:53:46 -07:00
{
config,
lib,
pkgs,
...
2024-10-20 13:12:44 -07:00
}: let
cfg = config.programs.tmux.rose-pine;
enable = cfg.enable && config.programs.tmux.enable;
2024-10-20 13:12:44 -07:00
in {
options.programs.tmux.rose-pine =
lib.rp.mkRosePineOpt {name = "tmux";}
// {
extraConfig = lib.mkOption {
type = lib.types.lines;
description = "Additional configuration for the rose-pine plugin.";
default = "";
example = ''
set -g @rose-pine "application session user host date_time"
'';
};
};
config.programs.tmux.plugins = lib.mkIf enable [
{
2024-10-20 13:12:44 -07:00
plugin = pkgs.tmuxPlugins.rose-pine;
extraConfig = lib.concatStrings [
''
2024-10-20 13:12:44 -07:00
set -g @rose_pine_variant '${cfg.flavor}'
''
cfg.extraConfig
];
}
];
}