{ config, lib, ... }: let inherit (config.rose-pine) sources; cfg = config.programs.rio.rose-pine; enable = cfg.enable && config.programs.rio.enable; themeName = if (cfg.flavor == "main") then "rose-pine" else "rose-pine-${cfg.flavor}"; in { options.programs.rio.rose-pine = lib.rp.mkRosePineOpt {name = "rio";}; config = lib.mkIf enable { programs.rio.settings = lib.importTOML "${sources.rio-terminal}/${themeName}.toml"; }; }