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

25 lines
562 B
Nix
Raw Normal View History

{
2024-10-20 13:04:49 -07:00
config,
lib,
...
}: let
inherit (config.rose-pine) sources;
cfg = config.wayland.windowManager.sway.rose-pine;
enable = cfg.enable && config.wayland.windowManager.sway.enable;
themeName =
if (cfg.flavor == "main")
then "rose-pine"
else "rose-pine-${cfg.flavor}";
theme = "${sources.sway}/themes/${themeName}.theme";
in {
options.wayland.windowManager.sway.rose-pine = lib.rp.mkRosePineOpt {name = "sway";};
config = lib.mkIf enable {
wayland.windowManager.sway.extraConfigEarly = ''
include ${theme}
'';
};
}