From 12733d64c3c5e79d777dff3f0f908ab0e39f7082 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 17 Apr 2023 22:50:23 -0400 Subject: [PATCH] feat(home-manager): add support for sway (#26) --- modules/home-manager/default.nix | 1 + modules/home-manager/sway.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 modules/home-manager/sway.nix 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); +}