puzzlevision/modules/home/themes/catppuccin/palette/default.nix

14 lines
428 B
Nix

{
lib,
pkgs,
config,
namespace,
...
}: let
inherit (lib) mkOption mkIf;
palette = (pkgs.lib.importJSON (config.catppuccin.sources.palette + "/palette.json")).${config.catppuccin.flavor}.colors;
in {
options.${namespace}.themes.catppuccin.palette = mkOption {type = lib.types.attrsOf lib.types.raw;};
config.${namespace}.themes.catppuccin.palette = mkIf config.${namespace}.themes.catppuccin.enable palette;
}