rose-pine-nix/modules/home-manager/micro.nix

18 lines
515 B
Nix
Raw Normal View History

2024-05-21 14:53:46 -07:00
{ config, lib, ... }:
let
inherit (config.catppuccin) sources;
cfg = config.programs.micro.catppuccin;
enable = cfg.enable && config.programs.micro.enable;
themePath = "catppuccin-${cfg.flavor}.micro";
in
{
options.programs.micro.catppuccin = lib.ctp.mkCatppuccinOpt { name = "micro"; };
config = lib.mkIf enable {
programs.micro.settings.colorscheme = lib.removeSuffix ".micro" themePath;
xdg.configFile."micro/colorschemes/${themePath}".source = "${sources.micro}/src/${themePath}";
};
}