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 {
|
2023-11-03 10:25:24 -07:00
|
|
|
assertions = [
|
|
|
|
(lib.ctp.assertXdgEnabled "micro")
|
|
|
|
];
|
|
|
|
|
2023-11-02 09:05:02 -07:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|