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

20 lines
448 B
Nix

{
config,
lib,
...
}:
let
inherit (config.rose-pine) sources;
cfg = config.programs.alacritty.rose-pine;
enable = cfg.enable && config.programs.alacritty.enable;
themeName = lib.rp.getKebabTheme cfg.flavor;
in
{
options.programs.alacritty.rose-pine = lib.rp.mkRosePineOpt { name = "alacritty"; };
config = lib.mkIf enable {
programs.alacritty.settings = lib.importTOML "${sources.alacritty}/dist/${themeName}.toml";
};
}