diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 03c1c51..ee73928 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -12,6 +12,7 @@ in { ./helix.nix ./gtk.nix ./polybar.nix + ./sway.nix ./tmux.nix ]; in extendedLib.ctp.mapModules config pkgs extendedLib files; diff --git a/modules/home-manager/sway.nix b/modules/home-manager/sway.nix new file mode 100644 index 0000000..545209b --- /dev/null +++ b/modules/home-manager/sway.nix @@ -0,0 +1,19 @@ +{ config, pkgs, lib, ... }: +let + cfg = config.wayland.windowManager.sway.catppuccin; + 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 = with lib; + with builtins; + mkIf cfg.enable (readFile theme); +}