feat(home-manager): add support for sway (#26)

This commit is contained in:
seth 2023-04-17 22:50:23 -04:00 committed by GitHub
parent be6320c4b1
commit 12733d64c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View file

@ -12,6 +12,7 @@ in {
./helix.nix
./gtk.nix
./polybar.nix
./sway.nix
./tmux.nix
];
in extendedLib.ctp.mapModules config pkgs extendedLib files;

View file

@ -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);
}