2023-11-02 09:05:02 -07:00
|
|
|
{ config
|
|
|
|
, lib
|
2023-11-02 10:55:47 -07:00
|
|
|
, sources
|
2023-11-02 09:05:02 -07:00
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
cfg = config.programs.micro.catppuccin;
|
|
|
|
enable = cfg.enable && config.programs.micro.enable;
|
|
|
|
|
|
|
|
themePath = "catppuccin-${cfg.flavour}.micro";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.programs.micro.catppuccin =
|
2023-11-02 10:55:47 -07:00
|
|
|
lib.ctp.mkCatppuccinOpt "micro";
|
2023-11-02 09:05:02 -07:00
|
|
|
|
|
|
|
config = lib.mkIf enable {
|
|
|
|
programs.micro.settings.colorscheme = lib.removeSuffix ".micro" themePath;
|
|
|
|
|
|
|
|
xdg = {
|
|
|
|
# xdg is required for this to work
|
|
|
|
enable = lib.mkForce true;
|
2023-11-02 10:55:47 -07:00
|
|
|
configFile."micro/colorschemes/${themePath}".source = "${sources.micro}/src/${themePath}";
|
2023-11-02 09:05:02 -07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|