28e6d8a18d
* feat(modules): add `catppuccin.sources` option * refactor(modules)!: nvfetcher -> npins npins gives us a nicer file to import that is a simple name value pair of the port and the path in the store. this allows for easier overriding with the catppuccin.sources option * fix(modules): ensure default sources are applied to `catppuccin.sources`
33 lines
784 B
Nix
33 lines
784 B
Nix
{ config
|
|
, lib
|
|
, ...
|
|
}:
|
|
let
|
|
inherit (config.catppuccin) sources;
|
|
cfg = config.programs.helix.catppuccin;
|
|
enable = cfg.enable && config.programs.helix.enable;
|
|
in
|
|
{
|
|
options.programs.helix.catppuccin = with lib;
|
|
ctp.mkCatppuccinOpt "helix"
|
|
// {
|
|
useItalics = mkEnableOption "Italics in Catppuccin theme for Helix";
|
|
};
|
|
|
|
config.programs.helix =
|
|
let
|
|
subdir =
|
|
if cfg.useItalics
|
|
then "default"
|
|
else "no_italics";
|
|
in
|
|
lib.mkIf enable {
|
|
settings = {
|
|
theme = "catppuccin-${cfg.flavour}";
|
|
editor.color-modes = lib.mkDefault true;
|
|
};
|
|
|
|
themes."catppuccin-${cfg.flavour}" = builtins.fromTOML
|
|
(builtins.readFile "${sources.helix}/themes/${subdir}/catppuccin_${cfg.flavour}.toml");
|
|
};
|
|
}
|