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

25 lines
527 B
Nix

{
config,
lib,
...
}:
let
inherit (config.rose-pine) sources;
cfg = config.programs.zellij.rose-pine;
enable = cfg.enable && config.programs.zellij.enable;
themeName = lib.rp.getKebabTheme cfg.flavor;
theme = sources.zellij + "/dist/${themeName}.kdl";
in
{
options.programs.zellij.rose-pine = lib.rp.mkRosePineOpt { name = "zellij"; };
config = lib.mkIf enable {
xdg.configFile."zellij/themes/${themeName}.kdl".source = theme;
programs.zellij.settings = {
theme = themeName;
};
};
}