{ config, lib, ... }: let inherit (config.rose-pine) sources; cfg = config.programs.fish.rose-pine; enable = cfg.enable && config.programs.fish.enable; themeName = "Rosé Pine ${lib.rp.mkUpper (lib.rp.getFlavor cfg.flavor)}"; themePath = "/themes/${themeName}.theme"; in { options.programs.fish.rose-pine = lib.rp.mkRosePineOpt { name = "fish"; }; config = lib.mkIf enable { xdg.configFile."fish${themePath}".source = "${sources.fish}${themePath}"; programs.fish.shellInit = '' fish_config theme choose "${themeName}" ''; }; }