{ config, lib, ... }: let inherit (config.rose-pine) sources; cfg = config.programs.helix.rose-pine; enable = cfg.enable && config.programs.helix.enable; themeName = lib.rp.getSnakeTheme 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; }; themes."${themeName}" = lib.importTOML "${sources.helix}/${themeName}.toml"; }; }; }