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

22 lines
493 B
Nix
Raw Normal View History

{
2024-10-20 12:03:00 -07:00
config,
lib,
...
}: let
inherit (config.rose-pine) sources;
cfg = config.services.polybar.rose-pine;
enable = cfg.enable && config.services.polybar.enable;
themeName =
if (cfg.flavor == "main")
then "rose-pine"
else "rose-pine-${cfg.flavor}";
in {
options.services.polybar.rose-pine = lib.rp.mkRosePineOpt {name = "polybar";};
2023-04-14 20:00:14 -07:00
2024-05-21 14:53:46 -07:00
config.services.polybar.extraConfig = lib.mkIf enable (
2024-10-20 12:03:00 -07:00
builtins.readFile "${sources.polybar}/schemes/${themeName}.ini"
2024-05-21 14:53:46 -07:00
);
2023-04-14 20:00:14 -07:00
}