2023-07-13 09:17:51 -07:00
|
|
|
{
|
2024-10-19 23:02:44 -07:00
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2024-11-04 20:55:40 -08:00
|
|
|
}:
|
|
|
|
let
|
2024-10-19 23:02:44 -07:00
|
|
|
inherit (config.rose-pine) sources;
|
2023-04-14 19:37:39 -07:00
|
|
|
|
2024-10-19 23:02:44 -07:00
|
|
|
cfg = config.programs.helix.rose-pine;
|
|
|
|
enable = cfg.enable && config.programs.helix.enable;
|
2023-07-13 09:17:51 -07:00
|
|
|
|
2024-11-04 20:55:40 -08:00
|
|
|
themeName = lib.rp.getSnakeTheme cfg.flavor;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.programs.helix.rose-pine = lib.rp.mkRosePineOpt { name = "helix"; };
|
2024-10-19 23:02:44 -07:00
|
|
|
|
|
|
|
config = lib.mkIf enable {
|
|
|
|
programs.helix = {
|
|
|
|
settings = {
|
|
|
|
theme = themeName;
|
|
|
|
editor.color-modes = lib.mkDefault true;
|
2024-05-21 17:23:55 -07:00
|
|
|
};
|
2024-10-19 23:02:44 -07:00
|
|
|
|
|
|
|
themes."${themeName}" = lib.importTOML "${sources.helix}/${themeName}.toml";
|
|
|
|
};
|
2024-05-21 17:23:55 -07:00
|
|
|
};
|
2023-04-14 19:37:39 -07:00
|
|
|
}
|