rose-pine-nix/modules/home-manager/sway.nix
Sefa Eyeoglu 7513e5edf8
fix(home-manager/sway): avoid IFD (#45)
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-10-22 12:53:26 -04:00

27 lines
643 B
Nix

{ config
, pkgs
, lib
, ...
}:
let
cfg = config.wayland.windowManager.sway.catppuccin;
enable = cfg.enable && config.wayland.windowManager.sway.enable;
theme =
pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "sway";
rev = "c89098fc3517b64f0422aaaccb98dcab6ae9348f";
sha256 = "sha256-6Cvsmdl3OILz1vZovyBIuuSpm207I3W0dmUGowR9Ugk=";
}
+ "/themes/catppuccin-${cfg.flavour}";
in
{
options.wayland.windowManager.sway.catppuccin =
lib.ctp.mkCatppuccinOpt "sway" config;
config.wayland.windowManager.sway.extraConfigEarly =
lib.mkIf enable ''
include ${theme}
'';
}