rose-pine-nix/modules/home-manager/alacritty.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

28 lines
669 B
Nix

{ config
, pkgs
, lib
, ...
}:
let
inherit (lib) ctp;
cfg = config.programs.alacritty.catppuccin;
enable = cfg.enable && config.programs.alacritty.enable;
in
{
options.programs.alacritty.catppuccin =
ctp.mkCatppuccinOpt "alacritty" config;
config.programs.alacritty.settings =
let
file =
pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "alacritty";
rev = "3c808cbb4f9c87be43ba5241bc57373c793d2f17";
sha256 = "sha256-w9XVtEe7TqzxxGUCDUR9BFkzLZjG8XrplXJ3lX6f+x0=";
}
+ "/catppuccin-${cfg.flavour}.yml";
in
lib.mkIf enable (ctp.fromYaml pkgs file);
}