rose-pine-nix/modules/home-manager/micro.nix
2024-05-21 22:53:46 +01:00

17 lines
504 B
Nix

{ config, lib, ... }:
let
inherit (config.catppuccin) sources;
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 {
programs.micro.settings.colorscheme = lib.removeSuffix ".micro" themePath;
xdg.configFile."micro/colorschemes/${themePath}".source = "${sources.micro}/src/${themePath}";
};
}