2024-05-21 14:53:46 -07:00
|
|
|
{ config, lib, ... }:
|
2023-11-02 09:05:02 -07:00
|
|
|
let
|
2024-05-13 13:33:16 -07:00
|
|
|
inherit (config.catppuccin) sources;
|
2023-11-02 09:05:02 -07:00
|
|
|
cfg = config.programs.micro.catppuccin;
|
|
|
|
enable = cfg.enable && config.programs.micro.enable;
|
|
|
|
|
2024-05-21 17:23:55 -07:00
|
|
|
themePath = "catppuccin-${cfg.flavor}.micro";
|
2023-11-02 09:05:02 -07:00
|
|
|
in
|
|
|
|
{
|
2024-06-28 09:29:30 -07:00
|
|
|
options.programs.micro.catppuccin = lib.ctp.mkCatppuccinOpt { name = "micro"; };
|
2023-11-02 09:05:02 -07:00
|
|
|
|
|
|
|
config = lib.mkIf enable {
|
|
|
|
programs.micro.settings.colorscheme = lib.removeSuffix ".micro" themePath;
|
|
|
|
|
2023-11-03 10:25:24 -07:00
|
|
|
xdg.configFile."micro/colorschemes/${themePath}".source = "${sources.micro}/src/${themePath}";
|
2023-11-02 09:05:02 -07:00
|
|
|
};
|
|
|
|
}
|