2023-07-13 09:17:51 -07:00
|
|
|
{
|
2024-10-19 23:02:44 -07:00
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
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-10-19 23:02:44 -07:00
|
|
|
themeName =
|
|
|
|
if (cfg.flavor == "main")
|
|
|
|
then "rose_pine"
|
|
|
|
else "rose_pine_${cfg.flavor}";
|
|
|
|
in {
|
|
|
|
options.programs.helix.rose-pine = lib.rp.mkRosePineOpt {name = "helix";};
|
|
|
|
|
|
|
|
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
|
|
|
}
|