rose-pine-nix/modules/home-manager/sway.nix
seth 60a1d9ba22
refactor: use alternatives to with and rec (#38)
* fix(home-manager): dont declare xdg.configFile when btop isn't enabled

* refactor: use alternatives to `with` and `rec`

---------

Co-authored-by: Sam Nystrom <sam@samnystrom.dev>
2023-07-13 12:17:51 -04:00

25 lines
636 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 (builtins.readFile theme);
}