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

19 lines
502 B
Nix

{ config, lib, ... }:
let
inherit (config.catppuccin) sources;
cfg = config.programs.btop.catppuccin;
enable = cfg.enable && config.programs.btop.enable;
themeFile = "catppuccin_${cfg.flavour}.theme";
themePath = "/themes/${themeFile}";
theme = sources.btop + themePath;
in
{
options.programs.btop.catppuccin = lib.ctp.mkCatppuccinOpt "btop";
config = lib.mkIf enable {
xdg.configFile."btop${themePath}".source = theme;
programs.btop.settings.color_theme = themeFile;
};
}