rose-pine-nix/modules/home-manager/rofi.nix

27 lines
549 B
Nix
Raw Normal View History

2024-10-20 12:19:42 -07:00
{
config,
lib,
...
}: let
inherit (config.rose-pine) sources;
2024-10-20 12:19:42 -07:00
cfg = config.programs.rofi.rose-pine;
enable = cfg.enable && config.programs.rofi.enable;
2024-10-20 12:19:42 -07:00
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 {
2024-10-20 12:19:42 -07:00
name = "${themeName}.rasi";
path = "${sources.rofi}/${themeName}.rasi";
};
};
};
}