a0e508260c
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
25 lines
549 B
Nix
25 lines
549 B
Nix
{ config
|
|
, lib
|
|
, sources
|
|
, ...
|
|
}:
|
|
let
|
|
cfg = config.programs.micro.catppuccin;
|
|
enable = cfg.enable && config.programs.micro.enable;
|
|
|
|
themePath = "catppuccin-${cfg.flavour}.micro";
|
|
in
|
|
{
|
|
options.programs.micro.catppuccin =
|
|
lib.ctp.mkCatppuccinOpt "micro";
|
|
|
|
config = lib.mkIf enable {
|
|
assertions = [
|
|
(lib.ctp.assertXdgEnabled "micro")
|
|
];
|
|
|
|
programs.micro.settings.colorscheme = lib.removeSuffix ".micro" themePath;
|
|
|
|
xdg.configFile."micro/colorschemes/${themePath}".source = "${sources.micro}/src/${themePath}";
|
|
};
|
|
}
|