{ config, lib, ... }: let inherit (config.rose-pine) sources; cfg = config.programs.rofi.rose-pine; enable = cfg.enable && config.programs.rofi.enable; themeName = if (cfg.flavor == "main") then "rose-pine" else "rose-pine-${cfg.flavor}"; in { options.programs.rofi.rose-pine = lib.rp.mkRosePineOpt {name = "rofi";}; config.programs.rofi = lib.mkIf enable { theme = { "@theme" = builtins.path { name = "${themeName}.rasi"; path = "${sources.rofi}/${themeName}.rasi"; }; }; }; }